mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 09:10:25 +08:00
FEATURE: New modal to show flags received for a user
This commit is contained in:
parent
ec65ae76b9
commit
34ed6088b9
15 changed files with 121 additions and 42 deletions
|
@ -145,6 +145,16 @@ module FlagQuery
|
|||
post_actions = post_actions.where("topics.id = ?", opts[:topic_id])
|
||||
end
|
||||
|
||||
if opts[:user_id]
|
||||
post_actions = post_actions.where("posts.user_id = ?", opts[:user_id])
|
||||
end
|
||||
|
||||
if opts[:filter] == 'without_custom'
|
||||
return post_actions.where(
|
||||
'post_action_type_id' => PostActionType.flag_types_without_custom.values
|
||||
)
|
||||
end
|
||||
|
||||
if opts[:filter] == "old"
|
||||
post_actions.where("post_actions.disagreed_at IS NOT NULL OR
|
||||
post_actions.deferred_at IS NOT NULL OR
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue