philomena/lib/philomena_web/templates/report/index.html.heex

51 lines
1.1 KiB
Text
Raw Normal View History

2024-06-02 05:50:36 +02:00
<h1>
Your Reports
</h1>
<div class="block">
<div class="block__header">
<span class="block__header__title">
Reports
</span>
<% route = fn p -> ~p"/reports?#{p}" end %>
<%= render(PhilomenaWeb.PaginationView, "_pagination.html", page: @reports, route: route, conn: @conn) %>
</div>
<div class="block__content">
<table class="table">
<thead>
<tr>
<th>
State
</th>
<th>
Reported Thing
</th>
<th>
Reason
</th>
<th>
Opened
</th>
</tr>
</thead>
<tbody>
<%= for r <- @reports do %>
<tr>
<td class={report_row_class(r)}>
<%= pretty_state(r) %>
</td>
<td>
<%= link_to_reported_thing(r.reportable) %>
</td>
<td>
<%= r.reason %>
</td>
<td>
<%= pretty_time(r.created_at) %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>