diff --git a/app/views/shared/wikis/_wiki_directory.html.haml b/app/views/shared/wikis/_wiki_directory.html.haml index 4b474a33bd56ea5856ca889bce15ae176e57bcff..4e4f5980f2f9f17cef44c7125586684ed0a65f1a 100644 --- a/app/views/shared/wikis/_wiki_directory.html.haml +++ b/app/views/shared/wikis/_wiki_directory.html.haml @@ -7,6 +7,6 @@ = render Pajamas::ButtonComponent.new(icon: 'plus', size: :small, href: "#{wiki_path}/{new_page_title}", button_options: { class: 'wiki-list-create-child-button gl-bg-transparent! gl-hover-bg-gray-50! gl-focus-bg-gray-50! gl-absolute gl-top-1/2 -gl-translate-y-1/2 gl-cursor-pointer gl-right-2' }) = link_to wiki_path, data: { testid: 'wiki-dir-page-link', qa_page_name: wiki_directory.title } do = wiki_directory.title - %ul.gl-pl-8 + %ul{ class: '!gl-pl-7' } - wiki_directory.entries.each do |entry| = render partial: entry.to_partial_path, object: entry, locals: { context: context } diff --git a/app/views/shared/wikis/pages.html.haml b/app/views/shared/wikis/pages.html.haml index e474e7e22096cf8016dac0f1ef4a50d260bdbb2b..1b262a9a917713a98bee4a92ed317c66f614a05b 100644 --- a/app/views/shared/wikis/pages.html.haml +++ b/app/views/shared/wikis/pages.html.haml @@ -8,13 +8,17 @@ = s_("Wiki|Wiki Pages") .nav-controls.pb-md-3.pb-lg-0 - = link_button_to wiki_path(@wiki, action: :git_access), icon: 'download' do - = _("Clone repository") - .dropdown.inline.wiki-sort-dropdown .btn-group{ role: 'group' } = wiki_sort_controls(@wiki, params[:direction]) + = render Pajamas::ButtonComponent.new(href: wiki_path(@wiki, action: :git_access), icon: 'download') do + = _("Clone repository") + + - if can?(current_user, :create_wiki, @project) + = render Pajamas::ButtonComponent.new(href: wiki_page_path(@wiki, SecureRandom.uuid, random_title: true), variant: :confirm) do + = s_("Wiki|New page") + %ul.wiki-pages-list.content-list - @wiki_entries.each do |entry| = render partial: entry.to_partial_path, object: entry, locals: { context: 'pages' }