2024-06-06 22:28:35 +02:00
|
|
|
- route = fn p -> ~p"/admin/reports?#{p}" end
|
2020-03-10 23:47:18 +01:00
|
|
|
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", route: route, page: @reports, conn: @conn, params: [rq: @conn.params["rq"] || "*"]
|
2019-12-08 18:45:37 +01:00
|
|
|
|
|
|
|
h1 Reports
|
|
|
|
|
|
|
|
= if Enum.any?(@my_reports) do
|
|
|
|
.block
|
|
|
|
.block__header
|
2023-11-23 17:07:49 +01:00
|
|
|
span Your Reports
|
2019-12-08 18:45:37 +01:00
|
|
|
.block__content
|
|
|
|
= render PhilomenaWeb.Admin.ReportView, "_reports.html", reports: @my_reports, conn: @conn
|
|
|
|
|
2022-03-24 17:31:57 +01:00
|
|
|
= if Enum.any?(@system_reports) do
|
|
|
|
.block
|
|
|
|
.block__header.block--danger
|
2023-11-23 17:07:49 +01:00
|
|
|
span System Reports
|
2022-03-24 17:31:57 +01:00
|
|
|
.block__content
|
|
|
|
= render PhilomenaWeb.Admin.ReportView, "_reports.html", reports: @system_reports, conn: @conn
|
|
|
|
|
2019-12-08 18:45:37 +01:00
|
|
|
.block
|
|
|
|
.block__header
|
2023-11-23 17:07:49 +01:00
|
|
|
span All Reports
|
2019-12-08 18:45:37 +01:00
|
|
|
= pagination
|
|
|
|
.block__content
|
|
|
|
= if Enum.any?(@reports) do
|
|
|
|
= render PhilomenaWeb.Admin.ReportView, "_reports.html", reports: @reports, conn: @conn
|
|
|
|
- else
|
|
|
|
p We couldn't find any reports for you, sorry!
|
|
|
|
|
|
|
|
.block__header.block__header--light
|
|
|
|
= pagination
|
|
|
|
|
2024-06-06 22:28:35 +02:00
|
|
|
= form_for :report, ~p"/admin/reports", [method: "get", class: "hform"], fn f ->
|
2019-12-08 18:45:37 +01:00
|
|
|
.field
|
|
|
|
= 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"
|
|
|
|
|
|
|
|
.field
|
|
|
|
label for="rq"
|
|
|
|
' Searchable fields: id, created_at, reason, state, open, user, user_id, admin, admin_id, ip, fingerprint, reportable_type, reportable_id, image_id
|
|
|
|
br
|
2020-02-21 03:32:08 +01:00
|
|
|
' Report reason is used if you don't specify a field.
|