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.
This commit is contained in:
Penar Musaraj
2022-10-20 15:04:21 -04:00
committed by GitHub
parent ab217d8ae0
commit a14825836f
3 changed files with 4 additions and 8 deletions

View File

@ -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}}

View File

@ -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>