From d632d2d82f0d7d662972f5c2b3d23f8a821a0abd Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Gray <annabel.dunstone@gmail.com> Date: Tue, 14 May 2024 14:44:38 -0600 Subject: [PATCH] Use confirm variant for new wiki template Changelog: changed --- app/views/shared/wikis/_main_links.html.haml | 2 +- app/views/shared/wikis/templates.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/shared/wikis/_main_links.html.haml b/app/views/shared/wikis/_main_links.html.haml index 9d64c7b4189f..7a0ad4f1391e 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 153f901ec5ec..f23562d48676 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 -- GitLab