[Users] Link to flag creator id search by default

Also exposes that field in the search form
This commit is contained in:
Earlopain 2023-03-29 18:03:34 +02:00
parent dfd17b5f86
commit e25878b03f
No known key found for this signature in database
GPG Key ID: 6CFB948E15246897
2 changed files with 2 additions and 1 deletions

View File

@ -131,7 +131,7 @@ class UserPresenter
end
def flag_count(template)
template.link_to(user.flag_count, template.post_flags_path(:search => {:creator_name => user.name}))
template.link_to(user.flag_count, template.post_flags_path( search: { creator_id: user.id }))
end
def approval_count(template)

View File

@ -4,6 +4,7 @@
<%= f.input :post_id, label: "Post ID" %>
<% if CurrentUser.is_janitor? %>
<%= f.input :creator_name, label: "Creator", autocomplete: "user" %>
<%= f.input :creator_id, label: "Creator ID", hide_unless_value: true %>
<%= f.input :ip_addr, label: "Ip Address" %>
<% end %>
<%= f.input :is_resolved, label: "Resolved?", collection: [["Yes", true], ["No", false]], include_blank: true %>