From de47b34b22ca877de366ad9f9744cd1621f21b77 Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Thu, 9 May 2013 14:18:03 -0400 Subject: [PATCH] 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 --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Browse.pm | 7 ++++--- Open-ILS/src/templates/opac/advanced.tt2 | 3 +-- Open-ILS/src/templates/opac/browse.tt2 | 6 +++--- Open-ILS/src/templates/opac/css/style.css.tt2 | 2 +- Open-ILS/src/templates/opac/parts/searchbar.tt2 | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) 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" %] -
+