mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: allow moderators to globally pin topics
This commit is contained in:
@@ -167,6 +167,11 @@ Discourse.TopicController = Discourse.ObjectController.extend(Discourse.Selected
|
||||
this.get('content').setStatus('pinned', this.get('pinned_at') ? false : true);
|
||||
},
|
||||
|
||||
togglePinnedGlobally: function() {
|
||||
// Note that this is different than clearPin
|
||||
this.get('content').setStatus('pinned_globally', this.get('pinned_at') ? false : true);
|
||||
},
|
||||
|
||||
toggleArchived: function() {
|
||||
this.get('content').toggleStatus('archived');
|
||||
},
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
<button {{action togglePinned}} class='btn btn-admin'><i class='fa fa-thumb-tack'></i> {{i18n topic.actions.unpin}}</button>
|
||||
{{else}}
|
||||
<button {{action togglePinned}} class='btn btn-admin'><i class='fa fa-thumb-tack'></i> {{i18n topic.actions.pin}}</button>
|
||||
<button {{action togglePinnedGlobally}} class='btn btn-admin'><i class='fa fa-thumb-tack'></i> {{i18n topic.actions.pin_globally}}</button>
|
||||
{{/if}}
|
||||
</li>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user