diff --git a/app/assets/javascripts/discourse/widgets/post-small-action.js.es6 b/app/assets/javascripts/discourse/widgets/post-small-action.js.es6 index 8c59b053d7c..b128b246ce6 100644 --- a/app/assets/javascripts/discourse/widgets/post-small-action.js.es6 +++ b/app/assets/javascripts/discourse/widgets/post-small-action.js.es6 @@ -16,6 +16,8 @@ const icons = { 'pinned.disabled': 'thumb-tack unpinned', 'pinned_globally.enabled': 'thumb-tack', 'pinned_globally.disabled': 'thumb-tack unpinned', + 'banner.enabled': 'thumb-tack', + 'banner.disabled': 'thumb-tack unpinned', 'visible.enabled': 'eye', 'visible.disabled': 'eye-slash', 'split_topic': 'sign-out', diff --git a/app/models/topic.rb b/app/models/topic.rb index 93f3cfab50e..4077ecd515c 100644 --- a/app/models/topic.rb +++ b/app/models/topic.rb @@ -833,7 +833,7 @@ SQL .update_all(dismissed_banner_key: nil) self.archetype = Archetype.banner - self.add_moderator_post(user, I18n.t("archetypes.banner.message.make")) + self.add_small_action(user, "banner.enabled") self.save MessageBus.publish('/site/banner', banner) @@ -841,7 +841,7 @@ SQL def remove_banner!(user) self.archetype = Archetype.default - self.add_moderator_post(user, I18n.t("archetypes.banner.message.remove")) + self.add_small_action(user, "banner.disabled") self.save MessageBus.publish('/site/banner', nil) diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 94b8d74aa36..cd3f3d15b13 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -162,6 +162,9 @@ en: visible: enabled: 'listed %{when}' disabled: 'unlisted %{when}' + banner: + enabled: 'made this a banner %{when}. It will appear at the top of every page until it is dismissed by the user.' + disabled: 'removed this banner %{when}. It will no longer appear at the top of every page.' topic_admin_menu: "topic admin actions"