From f7b1490f4c662132eb8c8c3eb0d3926591abd628 Mon Sep 17 00:00:00 2001 From: Kyle Tomita Date: Thu, 4 Apr 2013 10:23:37 -0700 Subject: [PATCH] LP1164197 - Add page number navigation to my lists and setting for number of lists per page Added code for page number navigation. Signed-off-by: Kyle Tomita --- Open-ILS/src/templates/opac/myopac/lists.tt2 | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Open-ILS/src/templates/opac/myopac/lists.tt2 b/Open-ILS/src/templates/opac/myopac/lists.tt2 index 5f7dc2dd29..ae7c76fc30 100644 --- a/Open-ILS/src/templates/opac/myopac/lists.tt2 +++ b/Open-ILS/src/templates/opac/myopac/lists.tt2 @@ -70,6 +70,37 @@ offset => (offset - limit) }) %]'>[% l('Previous') %] [%- END; -%] + [%- IF (offset - (limit * 3)) >= 0 -%] + (offset - (limit * 3)) + }) %]'>[% ((offset - (limit * 3)) / limit) + 1 %] + [%- END; -%] + [%- IF (offset - (limit * 2)) >= 0 -%] + (offset - (limit * 2)) + }) %]'>[% ((offset - (limit * 2)) / limit) + 1 %] + [%- END; -%] + [%- IF (offset - limit) >= 0 -%] + (offset - limit) + }) %]'>[% ((offset - limit) / limit) + 1 %] + [%- END; -%] + [% (offset / limit) + 1 %] + [%- IF (offset + limit) <= ctx.bookbag_count -%] + (offset + limit) + }) %]'>[% ((offset + limit) / limit) + 1 %] + [%- END; -%] + [%- IF (offset + (limit * 2)) <= ctx.bookbag_count -%] + (offset + (limit * 2)) + }) %]'>[% ((offset + (limit * 2)) / limit) + 1 %] + [%- END; -%] + [%- IF (offset + (limit * 3)) <= ctx.bookbag_count -%] + (offset + (limit * 3)) + }) %]'>[% ((offset + (limit * 3)) / limit) + 1 %] + [%- END; -%] [%- IF (ctx.bookbag_count - offset) > limit; -%] (offset + limit) -- 2.11.0