From: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Date: Fri, 22 Jul 2011 14:22:08 +0000 (-0400)
Subject: Call number shelf browser: fix prev/next links, wrong argument order in...
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=5503d5b731868c77160d74b1b48b9246fb1c48d5;p=contrib%2FConifer.git

Call number shelf browser: fix prev/next links, wrong argument order in...

... call to open-ils.search.callnumber.browse (count and offset mixed
up)

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

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index 021ae62e17..235cb6a987 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -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);
 }
 
diff --git a/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2 b/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
index 64a0e1f728..42311a1a3c 100644
--- a/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
+++ b/Open-ILS/web/templates/default/opac/parts/record/cnbrowse.tt2
@@ -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'>