% 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 %>
<%= render(PhilomenaWeb.Admin.ReportView, "_reports.html", reports: @my_reports, conn: @conn) %>
<% end %>
<%= if Enum.any?(@system_reports) do %>
<%= render(PhilomenaWeb.Admin.ReportView, "_reports.html", reports: @system_reports, conn: @conn) %>
<% end %>
<%= 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 %>
<%= 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 %>