philomena/lib/philomena_web/templates/ip_profile/show.html.heex

89 lines
2.3 KiB
Text
Raw Normal View History

2024-05-04 23:09:20 +02:00
<h1>
<%= @ip %>'s IP profile
2024-05-04 23:09:20 +02:00
</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>
2024-05-04 23:09:44 +02:00
<%= 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"]
) %>
2024-05-04 23:09:20 +02:00
</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>
2024-05-04 23:09:44 +02:00
<%= uip.uses %> times
2024-05-04 23:09:20 +02:00
</td>
<td>
<%= pretty_time(uip.updated_at) %>
</td>
<td>
<%= pretty_time(uip.user.created_at) %>
</td>
</tr>
<% end %>
</tbody>
</table>