mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Eradicate the dedupe_qs
filter
The new `extend_query` and `urlencode` filters are way cleaner ways to achieve what we did with `dedupe_qs`. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
c9374732c0
commit
210e459ba9
5 changed files with 11 additions and 53 deletions
|
@ -24,7 +24,7 @@
|
|||
<th>
|
||||
{% set off_qs = "%s=%d" | format(off_param, off) %}
|
||||
{% set by_qs = "%s=%s" | format(by_param, by_next | quote_plus) %}
|
||||
<a href="?{{ q | dedupe_qs(off_qs, by_qs) }}">
|
||||
<a href="?{{ q | extend_query([off_param, off], [by_param, by_next]) | urlencode }}">
|
||||
{{ "Start" | tr }}
|
||||
</a>
|
||||
</th>
|
||||
|
@ -97,7 +97,7 @@
|
|||
{% set off_qs = "%s=%d" | format(off_param, off - 10) %}
|
||||
{% set by_qs = "%s=%s" | format(by_param, by | quote_plus) %}
|
||||
<a class="page"
|
||||
href="?{{ q | dedupe_qs(off_qs, by_qs) }}">
|
||||
href="?{{ q | extend_query([off_param, ([off - 10, 0] | max)], [by_param, by]) | urlencode }}">
|
||||
‹ Back
|
||||
</a>
|
||||
{% endif %}
|
||||
|
@ -106,7 +106,7 @@
|
|||
{% set off_qs = "%s=%d" | format(off_param, off + 10) %}
|
||||
{% set by_qs = "%s=%s" | format(by_param, by | quote_plus) %}
|
||||
<a class="page"
|
||||
href="?{{ q | dedupe_qs(off_qs, by_qs) }}">
|
||||
href="?{{ q | extend_query([off_param, off + pp], [by_param, by]) | urlencode }}">
|
||||
Next ›
|
||||
</a>
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue