Skip to content

A platform for community discussion. Free, open, simple.

UX: Reorder post admin actions for greater consistency.

Dan Ungureanuf112f279ae1f
diff --git a/app/assets/javascripts/discourse/widgets/post-admin-menu.js.es6 b/app/assets/javascripts/discourse/widgets/post-admin-menu.js.es6
index 2cb9388e482..ad7d61a1798 100644
--- a/app/assets/javascripts/discourse/widgets/post-admin-menu.js.es6
+++ b/app/assets/javascripts/discourse/widgets/post-admin-menu.js.es6
@@ -37,24 +37,33 @@ export function buildManageButtons(attrs, currentUser, siteSettings) {
contents.push(buttonAtts);
}
- if (attrs.canManage) {
- contents.push({
- icon: "cog",
- label: "post.controls.rebake",
- action: "rebakePost",
- className: "btn-default rebuild-html"
- });
-
- if (attrs.hidden) {
+ if (currentUser.staff) {
+ if (attrs.noticeType) {
+ contents.push({
+ icon: "asterisk",
+ label: "post.controls.remove_post_notice",
+ action: "removeNotice",
+ className: "btn-default remove-notice"
+ });
+ } else {
contents.push({
- icon: "far-eye",
- label: "post.controls.unhide",
- action: "unhidePost",
- className: "btn-default unhide-post"
+ icon: "asterisk",
+ label: "post.controls.add_post_notice",
+ action: "addNotice",
+ className: "btn-default add-notice"
});
}
}
+ if (attrs.canManage && attrs.hidden) {
+ contents.push({
+ icon: "far-eye",
+ label: "post.controls.unhide",
+ action: "unhidePost",
+ className: "btn-default unhide-post"
+ });
+ }
+
if (currentUser.admin) {
contents.push({
icon: "user",
@@ -111,22 +120,13 @@ export function buildManageButtons(attrs, currentUser, siteSettings) {
}
}
- if (currentUser.staff) {
- if (attrs.noticeType) {
- contents.push({
- icon: "asterisk",
- label: "post.controls.remove_post_notice",
- action: "removeNotice",
- className: "btn-default remove-notice"
- });
- } else {
- contents.push({
- icon: "asterisk",
- label: "post.controls.add_post_notice",
- action: "addNotice",
- className: "btn-default add-notice"
- });
- }
+ if (attrs.canManage) {
+ contents.push({
+ icon: "cog",
+ label: "post.controls.rebake",
+ action: "rebakePost",
+ className: "btn-default rebuild-html"
+ });
}
return contents;
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 4eed7f7609a..60e37ea3035 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -2358,8 +2358,8 @@ en:
delete_topic_disallowed_modal: "You don't have permission to delete this topic. If you really want it to be deleted, submit a flag for moderator attention together with reasoning."
delete_topic_disallowed: "you don't have permission to delete this topic"
delete_topic: "delete topic"
- add_post_notice: "Add post notice"
- remove_post_notice: "Remove post notice"
+ add_post_notice: "Add Staff Notice"
+ remove_post_notice: "Remove Staff Notice"
actions:
flag: "Flag"