mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 14:57:59 +01:00
happy little changes
This commit is contained in:
parent
26deaaf588
commit
962af4d29b
3 changed files with 20 additions and 6 deletions
|
@ -12,7 +12,7 @@ defmodule PhilomenaWeb.Admin.ApprovalController do
|
|||
Image
|
||||
|> where(hidden_from_users: false)
|
||||
|> where(approved: false)
|
||||
|> order_by(desc: :id)
|
||||
|> order_by(asc: :id)
|
||||
|> preload([:user, tags: [:aliases, :aliased_tag]])
|
||||
|> Repo.paginate(conn.assigns.scrivener)
|
||||
|
||||
|
|
|
@ -118,10 +118,15 @@
|
|||
td.danger Different rating tags
|
||||
|
||||
tr
|
||||
= if forward_merge?(report) do
|
||||
td.warning Target newer
|
||||
- else
|
||||
td.success Target older
|
||||
= cond do
|
||||
- not source_approved?(report) ->
|
||||
td.danger Source is not approved
|
||||
- not target_approved?(report) ->
|
||||
td.danger Target is not approved
|
||||
- forward_merge?(report) ->
|
||||
td.warning Target newer
|
||||
- true ->
|
||||
td.success Target older
|
||||
|
||||
.flex.flex--column.grid--dupe-report-list__cell.border-vertical id="report_options_#{report.id}"
|
||||
.dr__status-options class=background_class
|
||||
|
|
|
@ -104,7 +104,16 @@ defmodule PhilomenaWeb.DuplicateReportView do
|
|||
|
||||
def mergeable?(%{image: image, duplicate_of_image: duplicate_of_image} = report) do
|
||||
same_rating_tags?(report) and not image.hidden_from_users and
|
||||
not duplicate_of_image.hidden_from_users
|
||||
not duplicate_of_image.hidden_from_users and image.approved and
|
||||
duplicate_of_image.approved
|
||||
end
|
||||
|
||||
def source_approved?(%{image: image}) do
|
||||
image.approved
|
||||
end
|
||||
|
||||
def target_approved?(%{duplicate_of_image: image}) do
|
||||
image.approved
|
||||
end
|
||||
|
||||
defp artist_tags(%{tags: tags}) do
|
||||
|
|
Loading…
Reference in a new issue