Fix pagination on matmat, don't allow empty matmat search and add htmx pagination

This commit is contained in:
2025-12-17 00:05:18 +01:00
parent f24e39ccb7
commit a2243e5e9a
6 changed files with 52 additions and 10 deletions

View File

@@ -161,6 +161,7 @@
hx-swap="innerHTML"
hx-target="#content"
hx-push-url="true"
hx-trigger="click, keyup[key=='ArrowLeft'] from:body"
{%- else -%}
href="?{{ querystring(page=current_page.previous_page_number()) }}"
{%- endif -%}
@@ -195,12 +196,13 @@
{% if current_page.has_next() %}
<a
{% if use_htmx -%}
hx-get="?querystring(page=current_page.next_page_number())"
hx-get="?{{querystring(page=current_page.next_page_number())}}"
hx-swap="innerHTML"
hx-target="#content"
hx-push-url="true"
hx-trigger="click, keyup[key=='ArrowRight'] from:body"
{%- else -%}
href="?querystring(page=current_page.next_page_number())"
href="?{{querystring(page=current_page.next_page_number())}}"
{%- endif -%}
><button>
<i class="fa fa-caret-right"></i>