mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-12-03 16:17:59 +01:00
86 lines
2.5 KiB
Text
86 lines
2.5 KiB
Text
<h1>
|
|
Fingerprint Bans
|
|
</h1>
|
|
<% route = fn p -> ~p"/admin/fingerprint_bans?#{p}" end %>
|
|
<% pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @fingerprint_bans, route: route, params: page_params(@conn.params)) %>
|
|
<%= form_for :fingerprint_ban, ~p"/admin/fingerprint_bans", [method: "get", class: "hform"], fn f -> %>
|
|
<div class="field">
|
|
<%= text_input(f, :q, name: "q", class: "hform__text input", placeholder: "Search") %>
|
|
<%= submit("Search", class: "button hform__button") %>
|
|
</div>
|
|
<% end %>
|
|
<div class="block">
|
|
<div class="block__header">
|
|
<a href={~p"/admin/fingerprint_bans/new"}>
|
|
<i class="fa fa-plus"></i>
|
|
New fingerprint ban
|
|
</a>
|
|
<%= pagination %>
|
|
</div>
|
|
<div class="block__content">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
Fingerprint
|
|
</th>
|
|
<th>
|
|
Created
|
|
</th>
|
|
<th>
|
|
Expires
|
|
</th>
|
|
<th>
|
|
Reason/Note
|
|
</th>
|
|
<th>
|
|
Ban ID
|
|
</th>
|
|
<th>
|
|
Options
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<%= for ban <- @fingerprint_bans do %>
|
|
<tr>
|
|
<td>
|
|
<%= link(ban.fingerprint, to: ~p"/fingerprint_profiles/#{ban.fingerprint}") %>
|
|
</td>
|
|
<td>
|
|
<%= pretty_time(ban.created_at) %>
|
|
<%= user_abbrv(ban.banning_user) %>
|
|
</td>
|
|
<td class={ban_row_class(ban)}>
|
|
<%= pretty_time(ban.valid_until) %>
|
|
</td>
|
|
<td>
|
|
<%= ban.reason %>
|
|
<%= if present?(ban.note) do %>
|
|
<p class="block block--fixed">
|
|
<em>
|
|
Note:
|
|
<%= ban.note %>
|
|
</em>
|
|
</p>
|
|
<% end %>
|
|
</td>
|
|
<td>
|
|
<%= ban.generated_ban_id %>
|
|
</td>
|
|
<td>
|
|
<%= link("Edit", to: ~p"/admin/fingerprint_bans/#{ban}/edit") %>
|
|
<%= if @current_user.role == "admin" do %>
|
|
•
|
|
<%= link("Destroy", to: ~p"/admin/fingerprint_bans/#{ban}", data: [confirm: "Are you really, really sure?", method: "delete"]) %>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="block__header block__header--light">
|
|
<%= pagination %>
|
|
</div>
|
|
</div>
|