UX: Reorder post admin actions for greater consistency.

This commit is contained in:
Dan Ungureanu 2019-04-22 10:57:14 +03:00
parent caeb035b61
commit f112f279ae
No known key found for this signature in database
GPG Key ID: 0AA2A00D6ACC8B84
2 changed files with 31 additions and 31 deletions

View File

@ -37,15 +37,25 @@ export function buildManageButtons(attrs, currentUser, siteSettings) {
contents.push(buttonAtts);
}
if (attrs.canManage) {
if (currentUser.staff) {
if (attrs.noticeType) {
contents.push({
icon: "cog",
label: "post.controls.rebake",
action: "rebakePost",
className: "btn-default rebuild-html"
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.hidden) {
if (attrs.canManage && attrs.hidden) {
contents.push({
icon: "far-eye",
label: "post.controls.unhide",
@ -53,7 +63,6 @@ export function buildManageButtons(attrs, currentUser, siteSettings) {
className: "btn-default unhide-post"
});
}
}
if (currentUser.admin) {
contents.push({
@ -111,22 +120,13 @@ export function buildManageButtons(attrs, currentUser, siteSettings) {
}
}
if (currentUser.staff) {
if (attrs.noticeType) {
if (attrs.canManage) {
contents.push({
icon: "asterisk",
label: "post.controls.remove_post_notice",
action: "removeNotice",
className: "btn-default remove-notice"
icon: "cog",
label: "post.controls.rebake",
action: "rebakePost",
className: "btn-default rebuild-html"
});
} else {
contents.push({
icon: "asterisk",
label: "post.controls.add_post_notice",
action: "addNotice",
className: "btn-default add-notice"
});
}
}
return contents;

View File

@ -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"