Adds elided page range to editions

This commit is contained in:
Mouse Reeve 2022-03-10 09:49:17 -08:00
parent 672eee9c9c
commit cbcd5c7a57

View file

@ -58,8 +58,12 @@ class Editions(View):
)
paginated = Paginator(editions, PAGE_LENGTH)
page = paginated.get_page(request.GET.get("page"))
data = {
"editions": paginated.get_page(request.GET.get("page")),
"editions": page,
"page_range": paginated.get_elided_page_range(
page.number, on_each_side=2, on_ends=1
),
"work": work,
"languages": languages,
"formats": set(