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:
parent
ab217d8ae0
commit
a14825836f
|
@ -16,13 +16,8 @@
|
||||||
}} />
|
}} />
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if this.category}}
|
{{#if (and this.category this.showCategoryEdit)}}
|
||||||
{{#unless this.tag}}
|
<DButton @class="btn-default edit-category" @action={{this.editCategory}} @icon="wrench" @title="category.edit_title" />
|
||||||
{{!-- 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}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if this.tag}}
|
{{#if this.tag}}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<PluginOutlet @name="discovery-navigation-bar-above" @connectorTagName="div" />
|
<PluginOutlet @name="discovery-navigation-bar-above" @connectorTagName="div" />
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<section class="navigation-container tag-navigation">
|
<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}} />
|
<PluginOutlet @name="tag-navigation" @connectorTagName="div" @args={{hash category=this.category tag=this.tag}} />
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -3455,6 +3455,7 @@ en:
|
||||||
all: "All categories"
|
all: "All categories"
|
||||||
choose: "category…"
|
choose: "category…"
|
||||||
edit: "Edit"
|
edit: "Edit"
|
||||||
|
edit_title: "Edit this category"
|
||||||
edit_dialog_title: "Edit: %{categoryName}"
|
edit_dialog_title: "Edit: %{categoryName}"
|
||||||
view: "View Topics in Category"
|
view: "View Topics in Category"
|
||||||
back: "Back to category"
|
back: "Back to category"
|
||||||
|
|
Loading…
Reference in New Issue