mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 14:57:59 +01:00
sort tag changes by id instead of creation date (derpibooru/philomena#200)
This commit is contained in:
parent
f5229654e7
commit
0f69ae6fcf
9 changed files with 9 additions and 9 deletions
|
@ -11,7 +11,7 @@ defmodule PhilomenaWeb.FingerprintProfile.SourceChangeController do
|
|||
source_changes =
|
||||
SourceChange
|
||||
|> where(fingerprint: ^fingerprint)
|
||||
|> order_by(desc: :created_at)
|
||||
|> order_by(desc: :id)
|
||||
|> preload([:user, image: [:user, :tags]])
|
||||
|> Repo.paginate(conn.assigns.scrivener)
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ defmodule PhilomenaWeb.FingerprintProfile.TagChangeController do
|
|||
|> where(fingerprint: ^fingerprint)
|
||||
|> added_filter(params)
|
||||
|> preload([:tag, :user, image: [:user, :tags]])
|
||||
|> order_by(desc: :created_at)
|
||||
|> order_by(desc: :id)
|
||||
|> Repo.paginate(conn.assigns.scrivener)
|
||||
|
||||
render(conn, "index.html",
|
||||
|
|
|
@ -16,7 +16,7 @@ defmodule PhilomenaWeb.Image.SourceChangeController do
|
|||
SourceChange
|
||||
|> where(image_id: ^image.id)
|
||||
|> preload([:user, image: [:user, :tags]])
|
||||
|> order_by(desc: :created_at)
|
||||
|> order_by(desc: :id)
|
||||
|> Repo.paginate(conn.assigns.scrivener)
|
||||
|
||||
render(conn, "index.html",
|
||||
|
|
|
@ -17,7 +17,7 @@ defmodule PhilomenaWeb.Image.TagChangeController do
|
|||
|> where(image_id: ^image.id)
|
||||
|> added_filter(params)
|
||||
|> preload([:tag, :user, image: [:user, :tags]])
|
||||
|> order_by(desc: :created_at)
|
||||
|> order_by(desc: :id)
|
||||
|> Repo.paginate(conn.assigns.scrivener)
|
||||
|
||||
render(conn, "index.html",
|
||||
|
|
|
@ -13,7 +13,7 @@ defmodule PhilomenaWeb.IpProfile.SourceChangeController do
|
|||
source_changes =
|
||||
SourceChange
|
||||
|> where(ip: ^ip)
|
||||
|> order_by(desc: :created_at)
|
||||
|> order_by(desc: :id)
|
||||
|> preload([:user, image: [:user, :tags]])
|
||||
|> Repo.paginate(conn.assigns.scrivener)
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ defmodule PhilomenaWeb.IpProfile.TagChangeController do
|
|||
|> where(ip: ^ip)
|
||||
|> added_filter(params)
|
||||
|> preload([:tag, :user, image: [:user, :tags]])
|
||||
|> order_by(desc: :created_at)
|
||||
|> order_by(desc: :id)
|
||||
|> Repo.paginate(conn.assigns.scrivener)
|
||||
|
||||
render(conn, "index.html",
|
||||
|
|
|
@ -26,7 +26,7 @@ defmodule PhilomenaWeb.Profile.SourceChangeController do
|
|||
sc.user_id == ^user.id and not (i.user_id == ^user.id and i.anonymous == true)
|
||||
)
|
||||
|> preload([:user, image: [:user, :tags]])
|
||||
|> order_by(desc: :created_at)
|
||||
|> order_by(desc: :id)
|
||||
|> Repo.paginate(conn.assigns.scrivener)
|
||||
|
||||
render(conn, "index.html",
|
||||
|
|
|
@ -22,7 +22,7 @@ defmodule PhilomenaWeb.Profile.TagChangeController do
|
|||
)
|
||||
|> added_filter(params)
|
||||
|> preload([:tag, :user, image: [:user, :tags]])
|
||||
|> order_by(desc: :created_at)
|
||||
|> order_by(desc: :id)
|
||||
|> Repo.paginate(conn.assigns.scrivener)
|
||||
|
||||
render(conn, "index.html",
|
||||
|
|
|
@ -17,7 +17,7 @@ defmodule PhilomenaWeb.Tag.TagChangeController do
|
|||
|> where(tag_id: ^tag.id)
|
||||
|> added_filter(params)
|
||||
|> preload([:tag, :user, image: [:user, :tags]])
|
||||
|> order_by(desc: :created_at)
|
||||
|> order_by(desc: :id)
|
||||
|> Repo.paginate(conn.assigns.scrivener)
|
||||
|
||||
render(conn, "index.html",
|
||||
|
|
Loading…
Reference in a new issue