Fixes #4208. Allow searching for multiple IPs or user IDs. Separate using spaces or commas.
24 lines
697 B
Plaintext
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>
|