Move "Hide Post" option up to the top on the review interface

If you agree with the post you are likely to want to hide it.
This commit is contained in:
Robin Ward 2019-06-26 11:35:59 -04:00
parent eedec7d79b
commit 14a64e7c4c
1 changed files with 4 additions and 2 deletions

View File

@ -36,6 +36,10 @@ class ReviewableFlaggedPost < Reviewable
agree = actions.add_bundle("#{id}-agree", icon: 'thumbs-up', label: 'reviewables.actions.agree.title') agree = actions.add_bundle("#{id}-agree", icon: 'thumbs-up', label: 'reviewables.actions.agree.title')
if !post.user_deleted? && !post.hidden?
build_action(actions, :agree_and_hide, icon: 'far-eye-slash', bundle: agree)
end
build_action(actions, :agree_and_keep, icon: 'thumbs-up', bundle: agree) build_action(actions, :agree_and_keep, icon: 'thumbs-up', bundle: agree)
if guardian.can_suspend?(target_created_by) if guardian.can_suspend?(target_created_by)
build_action(actions, :agree_and_suspend, icon: 'ban', bundle: agree, client_action: 'suspend') build_action(actions, :agree_and_suspend, icon: 'ban', bundle: agree, client_action: 'suspend')
@ -54,8 +58,6 @@ class ReviewableFlaggedPost < Reviewable
if post.user_deleted? if post.user_deleted?
build_action(actions, :agree_and_restore, icon: 'far-eye', bundle: agree) build_action(actions, :agree_and_restore, icon: 'far-eye', bundle: agree)
elsif !post.hidden?
build_action(actions, :agree_and_hide, icon: 'far-eye-slash', bundle: agree)
end end
if post.hidden? if post.hidden?