philomena/lib/philomena_web/templates/image/reporting/show.html.slime

32 lines
1.2 KiB
Text
Raw Normal View History

a href=~p"/images/#{@image}/reports/new"
2019-12-04 05:14:56 +01:00
button.button.button--link
i.fa.fa-exclamation-triangle>
' General reporting
.report-duplicate
- checked = Enum.any?(@dupe_reports, & &1.state == "open")
input.toggle-box id="image-dedupe" type="checkbox" checked=checked
label for="image-dedupe" Updating/merging
.toggle-box-container
.toggle-box-container__content
= if @conn.assigns.current_user do
= render PhilomenaWeb.DuplicateReportView, "_form.html", image: @image, conn: @conn, changeset: @changeset
- else
p
' You must
a> href=~p"/sessions/new" log in
2019-12-04 05:14:56 +01:00
' to report duplicate images.
- target_reports = Enum.filter(@dupe_reports, & &1.duplicate_of_image_id == @image.id)
- source_reports = Enum.filter(@dupe_reports, & &1.image_id == @image.id)
= if Enum.any?(@dupe_reports) do
h4 Existing duplicate reports
= if Enum.any?(target_reports) do
= render PhilomenaWeb.DuplicateReportView, "_list.html", duplicate_reports: target_reports, conn: @conn
= if Enum.any?(source_reports) do
= render PhilomenaWeb.DuplicateReportView, "_list.html", duplicate_reports: source_reports, conn: @conn