philomena/lib/philomena_web/templates/ip_profile/show.html.heex
2024-05-04 17:09:20 -04:00

92 lines
2.3 KiB
Text

<h1>
<%= @ip %>
's IP profile
</h1>
<ul>
<li>
<%= link("View images this IP has uploaded", to: ~p"/search?#{[q: "ip:#{@ip}"]}") %>
</li>
<li>
<%= link("View comments this IP has posted", to: ~p"/comments?#{[cq: "ip:#{@ip}"]}") %>
</li>
<li>
<%= link("View posts this IP has made", to: ~p"/posts?#{[pq: "ip:#{@ip}"]}") %>
</li>
</ul>
<%= render(PhilomenaWeb.BanView, "_bans.html", bans: @subnet_bans, conn: @conn) %>
<h2>
Administration Options
</h2>
<ul>
<li>
<%= link("View tag changes", to: ~p"/ip_profiles/#{to_string(@ip)}/tag_changes") %>
</li>
<li>
<%= link("View source URL history", to: ~p"/ip_profiles/#{to_string(@ip)}/source_changes") %>
</li>
<li>
<%= link("View reports this IP has made", to: ~p"/admin/reports?#{[rq: "ip:#{@ip}"]}") %>
</li>
<li>
<%= link("View IP ban history", to: ~p"/admin/subnet_bans?#{[ip: to_string(@ip)]}") %>
</li>
<li>
<%= link("Ban this sucker", to: ~p"/admin/subnet_bans/new?#{[specification: to_string(@ip)]}") %>
</li>
</ul>
<h2>
Actions
</h2>
<ul>
<li>
<%= link("Revert all tag changes", to: ~p"/tag_changes/full_revert?#{[ip: to_string(@ip)]}", data: [confirm: "Are you really, really sure?", method: "create"]) %>
</li>
<li>
<%=
link("...the button above didn't work (use carefully, this is resource-intensive)",
to: ~p"/tag_changes/full_revert?#{[ip: to_string(@ip), batch_size: 1]}",
data: [confirm: "Please confirm that you're aware that this may crash the site and are ready to take on the full wrath of the admins if it does so after you press this button.", method: "create"]
)
%>
</li>
</ul>
<h4>
Observed users
</h4>
<table class="table">
<thead>
<tr>
<th>
Username
</th>
<th>
Account Used
</th>
<th>
Last Seen
</th>
<th>
Created At
</th>
</tr>
</thead>
<tbody>
<%= for uip <- @user_ips do %>
<tr>
<td>
<%= link(uip.user.name, to: ~p"/profiles/#{uip.user}") %>
</td>
<td>
<%= uip.uses %>
times
</td>
<td>
<%= pretty_time(uip.updated_at) %>
</td>
<td>
<%= pretty_time(uip.user.created_at) %>
</td>
</tr>
<% end %>
</tbody>
</table>