From 1faeba831d222246d8d9ea01a99ac22471d3022f Mon Sep 17 00:00:00 2001 From: girst Date: Sat, 13 Nov 2021 23:25:37 +0100 Subject: [PATCH] macros.pagination -> macros.more hard-codes label text, removes obsolete direction marker --- app/browse/templates/channel.html.j2 | 2 +- app/browse/templates/playlist.html.j2 | 2 +- app/browse/templates/search.html.j2 | 2 +- app/reddit/templates/reddit.html.j2 | 2 +- app/templates/macros.imp.j2 | 4 ++-- app/youtube/templates/index.html.j2 | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/browse/templates/channel.html.j2 b/app/browse/templates/channel.html.j2 index 27d1299..0dac43c 100644 --- a/app/browse/templates/channel.html.j2 +++ b/app/browse/templates/channel.html.j2 @@ -41,6 +41,6 @@ {% if not rows|length %}no more results{% endif %}
- {{ macros.pagination("more", {'continuation': continuation}, +1) if continuation }} + {{ macros.more({'continuation': continuation}) if continuation }}
{% endblock %} diff --git a/app/browse/templates/playlist.html.j2 b/app/browse/templates/playlist.html.j2 index facacd1..5d18de4 100644 --- a/app/browse/templates/playlist.html.j2 +++ b/app/browse/templates/playlist.html.j2 @@ -16,6 +16,6 @@ {% if not rows|length %}no more results{% endif %}
- {{ macros.pagination("more", {'continuation': continuation}, +1) if continuation }} + {{ macros.more({'continuation': continuation}) if continuation }}
{% endblock %} diff --git a/app/browse/templates/search.html.j2 b/app/browse/templates/search.html.j2 index 87ceb64..dc72ec4 100644 --- a/app/browse/templates/search.html.j2 +++ b/app/browse/templates/search.html.j2 @@ -70,7 +70,7 @@
- {{ macros.pagination("more", {'continuation': continuation}, +1) if continuation }} + {{ macros.more({'continuation': continuation}) if continuation }}
{% else %} please type a search query. diff --git a/app/reddit/templates/reddit.html.j2 b/app/reddit/templates/reddit.html.j2 index 4128fd2..e012ae7 100644 --- a/app/reddit/templates/reddit.html.j2 +++ b/app/reddit/templates/reddit.html.j2 @@ -27,7 +27,7 @@
-{{ macros.pagination("more", {'continuation':continuation}, +1) if continuation }} + {{ macros.more({'continuation':continuation}) if continuation }}
{% endblock %} diff --git a/app/templates/macros.imp.j2 b/app/templates/macros.imp.j2 index 530d8f0..4469084 100644 --- a/app/templates/macros.imp.j2 +++ b/app/templates/macros.imp.j2 @@ -131,9 +131,9 @@ {%- endmacro %} -{% macro pagination(text, fields, direction) -%} +{% macro more(fields) -%} {% set request_args = dict(request.args) %} {% set _nil = request_args.update(fields) %} {% set new_qs = request_args|urlencode %} - + {%- endmacro %} diff --git a/app/youtube/templates/index.html.j2 b/app/youtube/templates/index.html.j2 index 351edd9..ce0adf4 100644 --- a/app/youtube/templates/index.html.j2 +++ b/app/youtube/templates/index.html.j2 @@ -18,7 +18,7 @@ {% if not rows|length %}no more results{% endif %}
- {{ macros.pagination("more", {'page':page+1}, +1) if rows|length }} + {{ macros.more({'page':page+1}) if rows|length }}
{% endblock %} -- 2.39.3