mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-20 04:14:23 +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
|
def display_order(tags) do
|
||||||
tags
|
tags
|
||||||
|> Enum.sort_by(&{
|
|> Enum.sort_by(&{
|
||||||
|
&1.category != "error",
|
||||||
&1.category != "rating",
|
&1.category != "rating",
|
||||||
&1.category != "origin",
|
&1.category != "origin",
|
||||||
&1.category != "character",
|
&1.category != "character",
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
a href="/pages/donations"
|
a href="/pages/donations"
|
||||||
' Become a patron or donate!
|
' Become a patron or donate!
|
||||||
.block.block--fixed.block--fixed--sub.center.hide-mobile
|
.block.block--fixed.block--fixed--sub.center.hide-mobile
|
||||||
| Issues? Want to chat?
|
' Issues? Want to chat?
|
||||||
a< href="/pages/contact" Contact us!
|
a href="/pages/contact" Contact us!
|
||||||
.block.hide-mobile
|
.block.hide-mobile
|
||||||
a.block__header--single-item.center href="/search?q=first_seen_at.gt:3 days ago&sf=score&sd=desc"
|
a.block__header--single-item.center href="/search?q=first_seen_at.gt:3 days ago&sf=score&sd=desc"
|
||||||
' Trending Images
|
' Trending Images
|
||||||
|
@ -49,5 +49,5 @@
|
||||||
span.hide-mobile
|
span.hide-mobile
|
||||||
' Browse Watched Images
|
' Browse Watched Images
|
||||||
.block__content.js-resizable-media-container
|
.block__content.js-resizable-media-container
|
||||||
- route = fn p -> Routes.search_path(@conn, :index, p) end
|
= for image <- @watched do
|
||||||
= render PhilomenaWeb.ImageView, "index.html", conn: @conn, images: @watched, size: :thumb_small, route: route, scope: [q: "my:watched"]
|
= render PhilomenaWeb.ImageView, "_image_box.html", image: image, link: Routes.image_path(@conn, :show, image, q: "my:watched"), size: :thumb_small, conn: @conn
|
||||||
|
|
|
@ -26,9 +26,17 @@
|
||||||
td
|
td
|
||||||
= pretty_time(source_change.created_at)
|
= 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
|
= 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
|
td
|
||||||
= if source_change.initial do
|
= if source_change.initial do
|
||||||
' ✓
|
' ✓
|
||||||
|
|
|
@ -33,8 +33,16 @@
|
||||||
td
|
td
|
||||||
= pretty_time(tag_change.created_at)
|
= 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
|
= 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
|
.block__header
|
||||||
= @pagination
|
= @pagination
|
|
@ -1,3 +1,13 @@
|
||||||
defmodule PhilomenaWeb.SourceChangeView do
|
defmodule PhilomenaWeb.SourceChangeView do
|
||||||
use PhilomenaWeb, :view
|
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
|
end
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
defmodule PhilomenaWeb.TagChangeView do
|
defmodule PhilomenaWeb.TagChangeView do
|
||||||
use PhilomenaWeb, :view
|
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
|
end
|
||||||
|
|
Loading…
Reference in a new issue