A platform for community discussion. Free, open, simple.
UX: Show category edit button when in tag intersection (#18679)
Penar Musaraja14825836fa3
diff --git a/app/assets/javascripts/discourse/app/templates/components/d-navigation.hbs b/app/assets/javascripts/discourse/app/templates/components/d-navigation.hbsindex 2e793cfaa8b..a3b72272010 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}}- <DButton @class="btn-default edit-category" @action={{this.editCategory}} @icon="wrench" @ariaLabel="category.edit" />- {{/if}}- {{/unless}}+ {{#if (and this.category this.showCategoryEdit)}}+ <DButton @class="btn-default edit-category" @action={{this.editCategory}} @icon="wrench" @title="category.edit_title" />{{/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.hbsindex de725a87a48..5d39fd087a4 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 @@<PluginOutlet @name="discovery-navigation-bar-above" @connectorTagName="div" /><div class="container"><section class="navigation-container tag-navigation">- <DNavigation @filterMode={{this.filterMode}} @canCreateTopic={{this.canCreateTopic}} @hasDraft={{this.currentUser.has_topic_draft}} @createTopic={{route-action "createTopic"}} @category={{this.category}} @tag={{this.tag}} @noSubcategories={{this.noSubcategories}} @tagNotification={{this.tagNotification}} @additionalTags={{this.additionalTags}} @showInfo={{this.showInfo}} @canCreateTopicOnTag={{this.canCreateTopicOnTag}} @changeTagNotificationLevel={{action "changeTagNotificationLevel"}} @toggleInfo={{action "toggleInfo"}} />+ <DNavigation @filterMode={{this.filterMode}} @canCreateTopic={{this.canCreateTopic}} @hasDraft={{this.currentUser.has_topic_draft}} @createTopic={{route-action "createTopic"}} @category={{this.category}} @editCategory={{route-action "editCategory" this.category}} @tag={{this.tag}} @noSubcategories={{this.noSubcategories}} @tagNotification={{this.tagNotification}} @additionalTags={{this.additionalTags}} @showInfo={{this.showInfo}} @canCreateTopicOnTag={{this.canCreateTopicOnTag}} @changeTagNotificationLevel={{action "changeTagNotificationLevel"}} @toggleInfo={{action "toggleInfo"}} /><PluginOutlet @name="tag-navigation" @connectorTagName="div" @args={{hash category=this.category tag=this.tag}} /></section>diff --git a/config/locales/client.en.yml b/config/locales/client.en.ymlindex e7c08d73729..7ac6707db41 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"