Thanks to Ben Shum and Kathy Lussier for the bug reports.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
$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;
}
}
$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'),
loc = ctx.search_ou;
-%]
<div id="search-wrapper">
- <div id="search-tools">
+ <div id="search-box">
<span class="search_catalog_lbl">[% l('Search the Catalog') %]</span>
<span><a href="[% mkurl(ctx.opac_root _ '/home') %]"
id="home_adv_search_link">[%l('Basic Search')%]</a></span>
<span><a href="[% mkurl(ctx.opac_root _ '/browse') %]">[%
l('Browse the Catalog')%]</a></span>
-
</div>
<div id="adv_search_parent">
<div id="adv_search_tabs">
<div id="search-wrapper">
[%# XXX TODO Give searchbar.tt2 more smarts so we can just do:
# INCLUDE "opac/parts/searchbar.tt2" %]
- <div id="search-tools">
+ <div id="search-box">
<span class="search_catalog_lbl"><a href="[% mkurl(ctx.opac_root _ '/home', {}, depart_list) %]">[% l('Search the Catalog') %]</a></span>
<span><a href="[% mkurl(ctx.opac_root _ '/advanced', {}, depart_list) %]"
id="home_adv_search_link">[%l('Advanced Search')%]</a></span>
[% IF browse.english_pager; # XXX how to apply i18n here?
current_qtype = CGI.param('qtype') || 'title' %]
<span class="browse-shortcuts">
- <a href="[% mkurl('', {qtype => current_qtype, bterm => '0'}, ['boffset','bpivot']) %]">0-9</a>
+ <a href="[% mkurl('', {qtype => current_qtype, bterm => '0'}, ['boffset','bpivot','bback']) %]">0-9</a>
[% FOR letter IN ['A'..'Z'] %]
- <a href="[% mkurl('', {qtype => current_qtype, bterm => letter}, ['boffset','bpivot']) %]">[% letter %]</a>
+ <a href="[% mkurl('', {qtype => current_qtype, bterm => letter}, ['boffset','bpivot','bback']) %]">[% letter %]</a>
[% END %]
</span>
[% END %]
text-align: center;
}
-#search-tools > span {
+#search-box > span {
margin: 0 1em;
}
.browse-error {
[% PROCESS "opac/parts/org_selector.tt2" %]
-<div id="search-box">
+<div id="search-wrapper">
[% UNLESS took_care_of_form -%]
<form action="[% ctx.opac_root %]/results" method="get">
[%- END %]
- <div id="search-tools">
+ <div id="search-box">
<span class="search_catalog_lbl">[% l('Search the Catalog') %]</span>
<a href="[% mkurl(ctx.opac_root _ '/advanced') %]"
id="home_adv_search_link">[% l('Advanced Search') %]</a>