From a14825836fa355d51ca0bd85fd75f95eb97ef741 Mon Sep 17 00:00:00 2001 From: Penar Musaraj Date: Thu, 20 Oct 2022 15:04:21 -0400 Subject: [PATCH] UX: Show category edit button when in tag intersection (#18679) Given that the category structure is generally speaking the backbone of most Discourse instances, it makes sense to show the edit button for the category even when the user is in a category/tag intersection route. --- .../discourse/app/templates/components/d-navigation.hbs | 9 ++------- .../javascripts/discourse/app/templates/tag/show.hbs | 2 +- config/locales/client.en.yml | 1 + 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/discourse/app/templates/components/d-navigation.hbs b/app/assets/javascripts/discourse/app/templates/components/d-navigation.hbs index 2e793cfaa8..a3b7227201 100644 --- a/app/assets/javascripts/discourse/app/templates/components/d-navigation.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/d-navigation.hbs @@ -16,13 +16,8 @@ }} /> {{/if}} - {{#if this.category}} - {{#unless this.tag}} - {{!-- don't show category edit button on tag pages --}} - {{#if this.showCategoryEdit}} - - {{/if}} - {{/unless}} + {{#if (and this.category this.showCategoryEdit)}} + {{/if}} {{#if this.tag}} diff --git a/app/assets/javascripts/discourse/app/templates/tag/show.hbs b/app/assets/javascripts/discourse/app/templates/tag/show.hbs index de725a87a4..5d39fd087a 100644 --- a/app/assets/javascripts/discourse/app/templates/tag/show.hbs +++ b/app/assets/javascripts/discourse/app/templates/tag/show.hbs @@ -9,7 +9,7 @@
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index e7c08d7372..7ac6707db4 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -3455,6 +3455,7 @@ en: all: "All categories" choose: "category…" edit: "Edit" + edit_title: "Edit this category" edit_dialog_title: "Edit: %{categoryName}" view: "View Topics in Category" back: "Back to category"