mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
fix misc pagination issues
This commit is contained in:
parent
8f7a9b7c50
commit
e4e20033e7
3 changed files with 3 additions and 2 deletions
|
@ -17,7 +17,7 @@ defmodule PhilomenaWeb.Admin.Badge.UserController do
|
|||
|> join(:inner, [u], _ in assoc(u, :awards))
|
||||
|> where([_u, a], a.badge_id == ^badge.id)
|
||||
|> order_by([u, _a], asc: u.name)
|
||||
|> Repo.paginate(conn.assigns.pagination)
|
||||
|> Repo.paginate(conn.assigns.scrivener)
|
||||
|
||||
render(conn, "index.html", title: "Users with badge #{badge.title}", users: users)
|
||||
end
|
||||
|
|
|
@ -28,7 +28,7 @@ defmodule PhilomenaWeb.DuplicateReportController do
|
|||
|> where([d], d.state in ^states)
|
||||
|> preload([:user, :modifier, image: [:user, :tags], duplicate_of_image: [:user, :tags]])
|
||||
|> order_by(desc: :created_at)
|
||||
|> Repo.paginate(conn.assigns.pagination)
|
||||
|> Repo.paginate(conn.assigns.scrivener)
|
||||
|
||||
render(conn, "index.html",
|
||||
title: "Duplicate Reports",
|
||||
|
|
|
@ -13,6 +13,7 @@ defmodule PhilomenaWeb.ReportController do
|
|||
reports =
|
||||
Report
|
||||
|> where(user_id: ^user.id)
|
||||
|> order_by(desc: :created_at)
|
||||
|> Repo.paginate(conn.assigns.scrivener)
|
||||
|
||||
polymorphic =
|
||||
|
|
Loading…
Reference in a new issue