FIX: Do not show empty list in the topic admin menu (#26825)
This commit is contained in:
parent
f4acb43ee7
commit
ddf7bbfa97
|
@ -294,33 +294,38 @@ export default class TopicAdminMenu extends Component {
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul class="topic-admin-menu-undefined">
|
{{#if (or this.currentUser.staff this.extraButtons.length)}}
|
||||||
{{#if this.currentUser.staff}}
|
<ul class="topic-admin-menu-undefined">
|
||||||
<li class="topic-admin-moderation-history">
|
{{#if this.currentUser.staff}}
|
||||||
<DButton
|
<li class="topic-admin-moderation-history">
|
||||||
class="btn-transparent"
|
<DButton
|
||||||
@label="review.moderation_history"
|
class="btn-transparent"
|
||||||
@href={{this.topicModerationHistoryUrl}}
|
@label="review.moderation_history"
|
||||||
@icon="list"
|
@href={{this.topicModerationHistoryUrl}}
|
||||||
/>
|
@icon="list"
|
||||||
</li>
|
/>
|
||||||
{{/if}}
|
</li>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{#each this.extraButtons as |button|}}
|
{{#each this.extraButtons as |button|}}
|
||||||
<li>
|
<li>
|
||||||
<DButton
|
<DButton
|
||||||
@label={{button.label}}
|
@label={{button.label}}
|
||||||
@translatedLabel={{button.translatedLabel}}
|
@translatedLabel={{button.translatedLabel}}
|
||||||
@icon={{button.icon}}
|
@icon={{button.icon}}
|
||||||
class={{concatClass
|
class={{concatClass
|
||||||
"btn-transparent"
|
"btn-transparent"
|
||||||
button.className
|
button.className
|
||||||
}}
|
}}
|
||||||
@action={{fn this.onExtraButtonAction button.action}}
|
@action={{fn
|
||||||
/>
|
this.onExtraButtonAction
|
||||||
</li>
|
button.action
|
||||||
{{/each}}
|
}}
|
||||||
</ul>
|
/>
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</:content>
|
</:content>
|
||||||
|
|
Loading…
Reference in New Issue