discourse/app/assets/javascripts/discourse/templates/topic-admin-menu.hbs

69 lines
2.2 KiB
Handlebars

<h3>{{i18n 'admin_title'}}</h3>
<ul>
<li>
{{d-button action="toggleMultiSelect" icon="tasks" label="topic.actions.multi_select" class="btn-admin"}}
</li>
{{#if details.can_delete}}
<li>
{{d-button action="deleteTopic" icon="trash-o" label="topic.actions.delete" class="btn-admin btn-danger"}}
</li>
{{/if}}
{{#if showRecover}}
<li>
{{d-button action="recoverTopic" icon="undo" label="topic.actions.recover" class="btn-admin"}}
</li>
{{/if}}
<li>
{{#if closed}}
{{d-button action="toggleClosed" icon="unlock" label="topic.actions.open" class="btn-admin"}}
{{else}}
{{d-button action="toggleClosed" icon="lock" label="topic.actions.close" class="btn-admin"}}
{{d-button action="showAutoClose" icon="clock-o" label="topic.actions.auto_close" class="btn-admin"}}
{{/if}}
</li>
{{#unless isPrivateMessage}}
<li>
{{#if isBanner}}
{{d-button action="removeBanner" icon="bullhorn" label="topic.actions.remove_banner" class="btn-admin"}}
{{else}}
{{#if visible}}
{{d-button action="makeBanner" icon="bullhorn" label="topic.actions.make_banner" class="btn-admin"}}
{{/if}}
{{/if}}
</li>
<li>
{{#if pinned_at}}
{{d-button action="togglePinned" icon="thumb-tack" label="topic.actions.unpin" class="btn-admin"}}
{{else}}
{{#if visible}}
{{d-button action="togglePinned" icon="thumb-tack" label="topic.actions.pin" class="btn-admin"}}
{{d-button action="togglePinnedGlobally" icon="thumb-tack" label="topic.actions.pin_globally" class="btn-admin"}}
{{/if}}
{{/if}}
</li>
{{/unless}}
<li>
{{#if archived}}
{{d-button action="toggleArchived" icon="folder" label="topic.actions.unarchive" class="btn-admin"}}
{{else}}
{{d-button action="toggleArchived" icon="folder" label="topic.actions.archive" class="btn-admin"}}
{{/if}}
</li>
<li>
{{#if visible}}
{{d-button action="toggleVisibility" icon="eye-slash" label="topic.actions.invisible" class="btn-admin"}}
{{else}}
{{d-button action="toggleVisibility" icon="eye" label="topic.actions.visible" class="btn-admin"}}
{{/if}}
</li>
{{plugin-outlet "topic-admin-menu-buttons"}}
</ul>