mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-24 04:27:59 +01:00
show error tags first; signifiy staff metadata updates; remove pagination from watched images section
This commit is contained in:
parent
6337b23dbe
commit
8196271976
6 changed files with 45 additions and 8 deletions
|
@ -99,6 +99,7 @@ defmodule Philomena.Tags.Tag do
|
|||
def display_order(tags) do
|
||||
tags
|
||||
|> Enum.sort_by(&{
|
||||
&1.category != "error",
|
||||
&1.category != "rating",
|
||||
&1.category != "origin",
|
||||
&1.category != "character",
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
a href="/pages/donations"
|
||||
' Become a patron or donate!
|
||||
.block.block--fixed.block--fixed--sub.center.hide-mobile
|
||||
| Issues? Want to chat?
|
||||
a< href="/pages/contact" Contact us!
|
||||
' Issues? Want to chat?
|
||||
a href="/pages/contact" Contact us!
|
||||
.block.hide-mobile
|
||||
a.block__header--single-item.center href="/search?q=first_seen_at.gt:3 days ago&sf=score&sd=desc"
|
||||
' Trending Images
|
||||
|
@ -49,5 +49,5 @@
|
|||
span.hide-mobile
|
||||
' Browse Watched Images
|
||||
.block__content.js-resizable-media-container
|
||||
- route = fn p -> Routes.search_path(@conn, :index, p) end
|
||||
= render PhilomenaWeb.ImageView, "index.html", conn: @conn, images: @watched, size: :thumb_small, route: route, scope: [q: "my:watched"]
|
||||
= for image <- @watched do
|
||||
= render PhilomenaWeb.ImageView, "_image_box.html", image: image, link: Routes.image_path(@conn, :show, image, q: "my:watched"), size: :thumb_small, conn: @conn
|
||||
|
|
|
@ -26,12 +26,20 @@
|
|||
td
|
||||
= pretty_time(source_change.created_at)
|
||||
|
||||
td
|
||||
td class=user_column_class(source_change)
|
||||
= render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: source_change, conn: @conn
|
||||
|
||||
= if staff?(source_change) do
|
||||
br
|
||||
small
|
||||
strong> Stop!
|
||||
' This user is a staff member.
|
||||
br
|
||||
' Ask them before reverting their changes.
|
||||
|
||||
td
|
||||
= if source_change.initial do
|
||||
' ✓
|
||||
|
||||
.block__header
|
||||
= @pagination
|
||||
= @pagination
|
||||
|
|
|
@ -33,8 +33,16 @@
|
|||
td
|
||||
= pretty_time(tag_change.created_at)
|
||||
|
||||
td
|
||||
td class=user_column_class(tag_change)
|
||||
= render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: tag_change, conn: @conn
|
||||
|
||||
= if staff?(tag_change) do
|
||||
br
|
||||
small
|
||||
strong> Stop!
|
||||
' This user is a staff member.
|
||||
br
|
||||
' Ask them before reverting their changes.
|
||||
|
||||
.block__header
|
||||
= @pagination
|
||||
= @pagination
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
defmodule PhilomenaWeb.SourceChangeView do
|
||||
use PhilomenaWeb, :view
|
||||
|
||||
def staff?(source_change),
|
||||
do: not is_nil(source_change.user) and not Philomena.Attribution.anonymous?(source_change) and source_change.user.role != "user"
|
||||
|
||||
def user_column_class(source_change) do
|
||||
case staff?(source_change) do
|
||||
true -> "success"
|
||||
false -> nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
defmodule PhilomenaWeb.TagChangeView do
|
||||
use PhilomenaWeb, :view
|
||||
|
||||
def staff?(tag_change),
|
||||
do: not is_nil(tag_change.user) and not Philomena.Attribution.anonymous?(tag_change) and tag_change.user.role != "user"
|
||||
|
||||
def user_column_class(tag_change) do
|
||||
case staff?(tag_change) do
|
||||
true -> "success"
|
||||
false -> nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue