Files
danbooru/app/views/ip_addresses/_index_by_user.html.erb
evazion 73c02021a1 /ip_addresses: allow searching multiple IPs at once.
Fixes #4208. Allow searching for multiple IPs or user IDs. Separate
using spaces or commas.
2019-11-11 21:03:07 -06:00

24 lines
697 B
Plaintext

<p>
<%= link_to "Find all IP addresses associated with these users", ip_addresses_path(search: { user_id: @ip_addresses.map(&:user_id).join(" "), group_by: "ip_addr" }) %>
</p>
<table class="striped autofit">
<thead>
<tr>
<th>User</th>
<th>Uses</th>
</tr>
</thead>
<tbody>
<% @ip_addresses.each do |ip| %>
<tr>
<td>
<%= link_to_user ip.user %>
<%= link_to "»", ip_addresses_path(search: { user_id: ip.user_id, group_by: "ip_addr" }) %>
</td>
<td><%= link_to ip.count_all, ip_addresses_path(search: { user_id: ip.user_id, ip_addr: params[:search][:ip_addr] }) %></td>
</tr>
<% end %>
</tbody>
</table>