diff options
-rw-r--r-- | templates/web/default/my/my.html | 29 | ||||
-rw-r--r-- | templates/web/default/pagination.html | 17 | ||||
-rwxr-xr-x | templates/web/default/reports/council.html | 22 |
3 files changed, 26 insertions, 42 deletions
diff --git a/templates/web/default/my/my.html b/templates/web/default/my/my.html index e7f4ca72d..2147ef5f2 100644 --- a/templates/web/default/my/my.html +++ b/templates/web/default/my/my.html @@ -13,7 +13,10 @@ <h1>[% loc('Your Reports') %]</h1> -[% INCLUDE pagination, pager = problems_pager %] +[% INCLUDE 'pagination.html', + pager = problems_pager, + param = 'p' +%] [% FOREACH p = problems.confirmed %] [% IF loop.first %]<h2>[% loc('Open reports') %]</h2>[% END %] @@ -35,7 +38,10 @@ END %] [% FOREACH u IN updates %] [% IF loop.first %] <h2>[% loc('Your updates') %]</h2> - [% INCLUDE pagination, pager = updates_pager %] + [% INCLUDE 'pagination.html', + pager = updates_pager, + param = 'u' + %] <ul> [% END %] @@ -68,22 +74,3 @@ END %] [% "</ul>" IF loop.last %] [% END %] -[% BLOCK pagination %] - [% IF pager.last_page > 1 %] - <p> - [% IF pager.previous_page %] - <a href="[% c.req.uri_with({'p_page' => pager.previous_page}) %]">← Previous</a> - [% ELSE %] - ← Previous - [% END %] - | - [% pager.first %] to [% pager.last %] of [% pager.total_entries %] - | - [% IF pager.next_page %] - <a href="[% c.req.uri_with({'p_page' => pager.next_page}) %]">Next →</a> - [% ELSE %] - Next → - [% END %] - </p> - [% END %] -[% END %] diff --git a/templates/web/default/pagination.html b/templates/web/default/pagination.html new file mode 100644 index 000000000..d26f07ce3 --- /dev/null +++ b/templates/web/default/pagination.html @@ -0,0 +1,17 @@ +[% IF pager.last_page > 1 %] + <p> + [% IF pager.previous_page %] + <a href="[% c.req.uri_with({ param => pager.previous_page }) %]">← Previous</a> + [% ELSE %] + ← Previous + [% END %] + | + [% pager.first %] to [% pager.last %] of [% pager.total_entries %] + | + [% IF pager.next_page %] + <a href="[% c.req.uri_with({ param => pager.next_page }) %]">Next →</a> + [% ELSE %] + Next → + [% END %] + </p> +[% END %] diff --git a/templates/web/default/reports/council.html b/templates/web/default/reports/council.html index 6d21d9f17..27eb208c0 100755 --- a/templates/web/default/reports/council.html +++ b/templates/web/default/reports/council.html @@ -47,7 +47,7 @@ <h2>[% name %]</h2> - [% INCLUDE 'pagination' %] + [% INCLUDE 'pagination.html', param = 'p' %] [% INCLUDE column title = loc('Recently fixed') @@ -104,23 +104,3 @@ [% END %] [% END %] -[% BLOCK pagination %] - [% IF pager.last_page > 1 %] - <p> - [% IF pager.previous_page %] - <a href="[% c.req.uri_with({'p' => pager.previous_page}) %]">← Previous</a> - [% ELSE %] - ← Previous - [% END %] - | - [% pager.first %] to [% pager.last %] of [% pager.total_entries %] - | - [% IF pager.next_page %] - <a href="[% c.req.uri_with({'p' => pager.next_page}) %]">Next →</a> - [% ELSE %] - Next → - [% END %] - </p> - [% END %] -[% END %] - |