Skip to content

Commit

Permalink
use larger page size for manifests page
Browse files Browse the repository at this point in the history
  • Loading branch information
leafo committed Feb 27, 2025
1 parent 473aafa commit 26cd0cb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
25 changes: 14 additions & 11 deletions applications/manifest.moon
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,20 @@ class MoonRocksManifest extends lapis.Application

@pager = Manifests\paginated [[
order by id asc
]], prepare_results: (manifests) ->
ManifestAdmins\include_in manifests, "manifest_id", flip: true, many: true
mas = {}

for m in *manifests
if admins = m.manifest_admins
for a in *admins
table.insert mas, a

Users\include_in mas, "user_id"
manifests
]], {
per_page: 50
prepare_results: (manifests) ->
ManifestAdmins\include_in manifests, "manifest_id", flip: true, many: true
mas = {}

for m in *manifests
if admins = m.manifest_admins
for a in *admins
table.insert mas, a

Users\include_in mas, "user_id"
manifests
}

@manifests = @pager\get_page @page
render: true
2 changes: 1 addition & 1 deletion views/manifests.moon
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Manifests extends require "widgets.page"
span class: "header_count", "(#{@pager\total_items!})"

p ->
text "Manifests are collections of modules that you can install from. The "
text "Manifests are collections of modules in a single namespace that you can install from. The "
a href: @url_for("manifest", manifest: "root"), -> code "root"
text " manifest is the default install location for LuaRocks.org. You can also "
a href: @url_for("new_manifest"), "create your own manifest."
Expand Down

0 comments on commit 26cd0cb

Please sign in to comment.