<% route = fn p -> ~p"/admin/reports?#{p}" end %> <% pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", route: route, page: @reports, conn: @conn, params: [rq: @conn.params["rq"] || "*"]) %>

Reports

<%= if Enum.any?(@my_reports) do %>
Your Reports
<%= render(PhilomenaWeb.Admin.ReportView, "_reports.html", reports: @my_reports, conn: @conn) %>
<% end %> <%= if Enum.any?(@system_reports) do %>
System Reports
<%= render(PhilomenaWeb.Admin.ReportView, "_reports.html", reports: @system_reports, conn: @conn) %>
<% end %>
All Reports <%= pagination %>
<%= if Enum.any?(@reports) do %> <%= render(PhilomenaWeb.Admin.ReportView, "_reports.html", reports: @reports, conn: @conn) %> <% else %>

We couldn't find any reports for you, sorry!

<% end %>
<%= pagination %>
<%= form_for :report, ~p"/admin/reports", [method: "get", class: "hform"], fn f -> %>
<%= text_input(f, :rq, name: :rq, value: @conn.params["rq"], class: "input hform__text", placeholder: "Search reports", autocapitalize: "none") %> <%= submit("Search", class: "hform__button button") %>
<% end %>