From: Lebbeous Fogle-Weekley Date: Thu, 9 May 2013 18:18:03 +0000 (-0400) Subject: OPAC Browse: fix 0-9 link in paging shortcuts; padding issues X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=538860fbde7820262abaf6afddf5650bf1f9484a;p=working%2FEvergreen.git OPAC Browse: fix 0-9 link in paging shortcuts; padding issues Thanks to Ben Shum and Kathy Lussier for the bug reports. Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Browse.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Browse.pm index df3f86c71f..3917bc2921 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Browse.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Browse.pm @@ -247,11 +247,12 @@ sub infer_browse_paging { $self->ctx->{more_forward} = 1; } - if ($offset > 0) { + if ($offset > 0 or (!$force_backward and $self->cgi->param('bpivot'))) { $self->ctx->{more_back} = 1; } elsif (scalar @$results < $limit) { $self->ctx->{more_back} = 0; - } else { + } elsif (not($self->cgi->param('bterm') eq '0' and + not defined $self->cgi->param('bpivot'))) { # paging links $self->ctx->{more_back} = 1; } } @@ -293,7 +294,7 @@ sub load_browse { $self->ctx->{more_forward} = 0; $self->ctx->{more_back} = 0; - if ($self->cgi->param('qtype') and $self->cgi->param('bterm')) { + if ($self->cgi->param('qtype') and defined $self->cgi->param('bterm')) { $self->leading_article_test( $self->cgi->param('qtype'), diff --git a/Open-ILS/src/templates/opac/advanced.tt2 b/Open-ILS/src/templates/opac/advanced.tt2 index 5c5a2c9930..38f01fbe1a 100644 --- a/Open-ILS/src/templates/opac/advanced.tt2 +++ b/Open-ILS/src/templates/opac/advanced.tt2 @@ -6,14 +6,13 @@ loc = ctx.search_ou; -%]
-
+
diff --git a/Open-ILS/src/templates/opac/browse.tt2 b/Open-ILS/src/templates/opac/browse.tt2 index 7e7a8b7b44..9e03d1e47e 100644 --- a/Open-ILS/src/templates/opac/browse.tt2 +++ b/Open-ILS/src/templates/opac/browse.tt2 @@ -16,7 +16,7 @@
[%# XXX TODO Give searchbar.tt2 more smarts so we can just do: # INCLUDE "opac/parts/searchbar.tt2" %] -
+