Call number shelf browser: fix prev/next links, wrong argument order in...
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Fri, 22 Jul 2011 14:22:08 +0000 (10:22 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Fri, 22 Jul 2011 14:22:08 +0000 (10:22 -0400)
... call to open-ils.search.callnumber.browse (count and offset mixed
up)

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>

Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2

index 021ae62..235cb6a 100644 (file)
@@ -208,7 +208,7 @@ sub browse_call_numbers {
 
     return $search->request(
         "open-ils.search.callnumber.browse", 
-        $cn, map { $self->cgi->param($_) } qw/loc cnoffset/, 9
+        $cn, $self->cgi->param("loc"), 9, $self->cgi->param("cnoffset")
     )->gather(1);
 }
 
index 64a0e1f..42311a1 100644 (file)
@@ -7,17 +7,17 @@
         <table class='data_grid bookshelf' width='100%'>
             <thead>
                 <tr>
-                    <td>[% IF CGI.param("cnoffset") > 0 %]
+                    <td>
                         <a id='cn_browse_prev' class='classic_link' href=">[% ctx.opac_root %]/record/[% ctx.bre_id _ extras_propagator _ '&amp;cnoffset=' _ ((CGI.param('cnoffset') || 0) - 1) _ '&amp;expand=cnbrowse#cnbrowse' %]"<b>[%
                             l("&lt;&lt; Previous Page")
                         %]</b></a>
-                        [% END %]</td>
+                    </td>
                     <td colspan='1' align='center'>[% l("Shelf Browser") %]</td>
-                    <td>[% IF ctx.browsed_call_numbers.size == 9 %]
+                    <td>
                         <a id='cn_browse_next' class='classic_link' href="[% ctx.opac_root %]/record/[% ctx.bre_id _ extras_propagator _ '&amp;cnoffset=' _ ((CGI.param('cnoffset') || 0) + 1) _ '&amp;expand=cnbrowse#cnbrowse' %]"<b>[%
                             l("Next Page &gt;&gt;")
                         %]</b></a>
-                        [% END %]</td>
+                    </td>
                 </tr>
             </thead>
             <tbody id='cn_tbody'>