Add a new IP address search page at /ip_addresses. Replaces the old search page at /moderator/ip_addrs. On user profile pages, show the user's last known IP to mods. Also add search links for finding other IPs or accounts associated with the user. IP address search uses a big UNION ALL statement to merge IP addresses across various tables into a single view. This makes searching easier, but is known to timeout in certain cases. Fixes #4207 (the new IP search page supports searching by subnet).
20 lines
517 B
Plaintext
20 lines
517 B
Plaintext
<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>
|