mirror of
https://github.com/discourse/discourse.git
synced 2025-04-25 03:04:30 +08:00
FIX: change button to 'remove feature' when a topic is already featured
This commit is contained in:
parent
df7c38dd51
commit
b0abe3a9d6
@ -4,6 +4,7 @@ import ObjectController from 'discourse/controllers/object';
|
||||
export default ObjectController.extend({
|
||||
menuVisible: false,
|
||||
showRecover: Em.computed.and('deleted', 'details.can_recover'),
|
||||
isFeatured: Em.computed.or("pinned_at", "isBanner"),
|
||||
|
||||
actions: {
|
||||
show: function() { this.set('menuVisible', true); },
|
||||
|
@ -29,7 +29,11 @@
|
||||
{{#unless isPrivateMessage}}
|
||||
{{#if visible}}
|
||||
<li>
|
||||
{{d-button action="showFeatureTopic" icon="bullhorn" label="topic.actions.feature" class="btn-admin"}}
|
||||
{{#if isFeatured}}
|
||||
{{d-button action="showFeatureTopic" icon="bullhorn" label="topic.actions.remove_feature" class="btn-admin"}}
|
||||
{{else}}
|
||||
{{d-button action="showFeatureTopic" icon="bullhorn" label="topic.actions.feature" class="btn-admin"}}
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
|
@ -974,6 +974,7 @@ en:
|
||||
close: "Close Topic"
|
||||
auto_close: "Auto Close"
|
||||
feature: "Feature Topic"
|
||||
remove_feature: "Remove Feature"
|
||||
make_banner: "Banner Topic"
|
||||
remove_banner: "Remove Banner Topic"
|
||||
pin: "Pin Topic"
|
||||
|
Loading…
x
Reference in New Issue
Block a user