From 9232a563a57ad4e57329a59d28d5ca0ed07276b5 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Nov 30 2015 12:15:14 +0000 Subject: [PATCH 1/2] Add the pagination links at the bottom of the repo list as well --- diff --git a/pagure/templates/_render_repo.html b/pagure/templates/_render_repo.html index dd3beaa..3c867de 100644 --- a/pagure/templates/_render_repo.html +++ b/pagure/templates/_render_repo.html @@ -71,6 +71,33 @@
{{ render_row(list) }}
+ {% if total and total > 1 %} + + {% endif %} {% endmacro %} From 2cb1c638e211e4eb1881c9eb6dedb7e20f2ae10b Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Nov 30 2015 12:24:04 +0000 Subject: [PATCH 2/2] Finally the macro ain't so bad to read and removes duplicated code --- diff --git a/pagure/templates/_render_repo.html b/pagure/templates/_render_repo.html index 3c867de..8598046 100644 --- a/pagure/templates/_render_repo.html +++ b/pagure/templates/_render_repo.html @@ -32,6 +32,35 @@ {%- endmacro %} +{% macro pagination_link(pagetitle, page, total) -%} + +{%- endmacro %} + + {% macro render_repos( list, total, pagetitle, page, title, count, id, username=None, hide=True) %}
{{ title }} ({{ count }}) {% if total and total > 1 %} - + {{ pagination_link(pagetitle, page, total) }} {% endif %}
{{ render_row(list) }}
{% if total and total > 1 %} - + {{ pagination_link(patetitle, page, total) }} {% endif %}
{% endmacro %}