mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-24 22:14:33 +01:00
suppress diff table if reports list is empty
This commit is contained in:
parent
4342978483
commit
2427d8d87c
1 changed files with 11 additions and 3 deletions
|
@ -18,6 +18,14 @@ a href=Routes.image_report_path(@conn, :new, @image)
|
||||||
a> href=Routes.pow_session_path(@conn, :new) log in
|
a> href=Routes.pow_session_path(@conn, :new) log in
|
||||||
' to report duplicate images.
|
' to report duplicate images.
|
||||||
|
|
||||||
h4 Existing duplicate reports
|
- target_reports = Enum.filter(@dupe_reports, & &1.duplicate_of_image_id == @image.id)
|
||||||
= render PhilomenaWeb.DuplicateReportView, "_list.html", duplicate_reports: Enum.filter(@dupe_reports, & &1.duplicate_of_image_id == @image.id), conn: @conn
|
- source_reports = Enum.filter(@dupe_reports, & &1.image_id == @image.id)
|
||||||
= render PhilomenaWeb.DuplicateReportView, "_list.html", duplicate_reports: Enum.filter(@dupe_reports, & &1.image_id == @image.id), conn: @conn
|
|
||||||
|
= 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
|
||||||
|
|
Loading…
Reference in a new issue