diff --git a/app/views/shared/wikis/_main_links.html.haml b/app/views/shared/wikis/_main_links.html.haml index 9d64c7b4189f6ea4d1d8d00fa5a14d42b153382a..7a0ad4f1391e950f2d5252984231dac1079d43f5 100644 --- a/app/views/shared/wikis/_main_links.html.haml +++ b/app/views/shared/wikis/_main_links.html.haml @@ -1,7 +1,7 @@ - if @page&.persisted? - if can?(current_user, :create_wiki, @wiki.container) - if @page.template? - = link_button_to wiki_page_path(@wiki, "#{Wiki::TEMPLATES_DIR}/#{SecureRandom.uuid}", random_title: true), icon: 'plus' do + = link_button_to wiki_page_path(@wiki, "#{Wiki::TEMPLATES_DIR}/#{SecureRandom.uuid}", random_title: true), variant: :confirm do = s_("Wiki|New template") - else = link_button_to wiki_path(@wiki, action: :new), role: "button", data: { testid: 'new-page-button' }, variant: :confirm, category: :secondary do diff --git a/app/views/shared/wikis/templates.html.haml b/app/views/shared/wikis/templates.html.haml index 153f901ec5ec7261ebf199a5cf71d56f6d6c00e5..f23562d486763b916d7d7191bcc30242a16a242f 100644 --- a/app/views/shared/wikis/templates.html.haml +++ b/app/views/shared/wikis/templates.html.haml @@ -8,7 +8,7 @@ = s_("Wiki|Wiki Templates") .nav-controls.pb-md-3.pb-lg-0 - = link_button_to wiki_page_path(@wiki, "#{Wiki::TEMPLATES_DIR}/#{SecureRandom.uuid}", random_title: true), icon: 'plus' do + = link_button_to wiki_page_path(@wiki, "#{Wiki::TEMPLATES_DIR}/#{SecureRandom.uuid}", random_title: true), variant: :confirm do = s_("Wiki|New template") .dropdown.inline.wiki-sort-dropdown