mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: add agree and edit (#27088)
* FEATURE: add agree and edit adds agree and edit - an alias for agree and keep -- but with a client action to edit the post in the composer before the flag is agreed with --------- Co-authored-by: Juan David Martinez <juan@discourse.org>
This commit is contained in:
@@ -9,6 +9,7 @@ class ReviewableFlaggedPost < Reviewable
|
||||
agree_and_keep_hidden: :agree_and_keep,
|
||||
agree_and_silence: :agree_and_keep,
|
||||
agree_and_suspend: :agree_and_keep,
|
||||
agree_and_edit: :agree_and_keep,
|
||||
disagree_and_restore: :disagree,
|
||||
ignore_and_do_nothing: :ignore,
|
||||
}
|
||||
@@ -59,6 +60,13 @@ class ReviewableFlaggedPost < Reviewable
|
||||
build_action(actions, :agree_and_keep_hidden, icon: "thumbs-up", bundle: agree_bundle)
|
||||
else
|
||||
build_action(actions, :agree_and_keep, icon: "thumbs-up", bundle: agree_bundle)
|
||||
build_action(
|
||||
actions,
|
||||
:agree_and_edit,
|
||||
icon: "pencil-alt",
|
||||
bundle: agree_bundle,
|
||||
client_action: "edit",
|
||||
)
|
||||
end
|
||||
|
||||
if guardian.can_delete_post_or_topic?(post)
|
||||
|
||||
Reference in New Issue
Block a user