LP1164197 - Add page number navigation to my lists and setting user/catalystit/lp1164197
authorKyle Tomita <ktomita@catalystitservices.com>
Thu, 4 Apr 2013 17:23:37 +0000 (10:23 -0700)
committerKyle Tomita <ktomita@catalystitservices.com>
Thu, 4 Apr 2013 17:23:37 +0000 (10:23 -0700)
for number of lists per page

Added code for page number navigation.

Signed-off-by: Kyle Tomita <ktomita@catalystitservices.com>
Open-ILS/src/templates/opac/myopac/lists.tt2

index 5f7dc2d..ae7c76f 100644 (file)
                     offset => (offset - limit)
                 }) %]'><span class="nav_arrow_fix">&#9668;</span>[% l('Previous') %]</a>
             [%- END; -%]
+            [%- IF (offset - (limit * 3)) >= 0 -%]
+                <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
+                    offset => (offset - (limit * 3))
+                }) %]'>[% ((offset - (limit * 3)) / limit) + 1 %]</a>
+            [%- END; -%]
+            [%- IF (offset - (limit * 2)) >= 0 -%]
+                <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
+                    offset => (offset - (limit * 2))
+                }) %]'>[% ((offset - (limit * 2)) / limit) + 1 %]</a>
+            [%- END; -%]
+            [%- IF (offset - limit) >= 0 -%]
+                <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
+                    offset => (offset - limit)
+                }) %]'>[% ((offset - limit) / limit) + 1 %]</a>
+            [%- END; -%]
+            <span style="color:red;" >[% (offset / limit) + 1 %]</span>
+            [%- IF (offset + limit) <= ctx.bookbag_count -%]
+                <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
+                    offset => (offset + limit)
+                }) %]'>[% ((offset + limit) / limit) + 1 %]</a>
+            [%- END; -%]
+            [%- IF (offset + (limit * 2)) <= ctx.bookbag_count -%]
+                <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
+                    offset => (offset + (limit * 2))
+                }) %]'>[% ((offset + (limit * 2)) / limit) + 1 %]</a>
+            [%- END; -%]
+            [%- IF (offset + (limit * 3)) <= ctx.bookbag_count -%]
+                <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
+                    offset => (offset + (limit * 3))
+                }) %]'>[% ((offset + (limit * 3)) / limit) + 1 %]</a>
+            [%- END; -%]
             [%- IF (ctx.bookbag_count - offset) > limit; -%] 
                 <a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
                     offset => (offset + limit)