In the current OPAC, there is no easy way to search a particular library.
By default, a user searches all libraries, or with SearcMyLibraryFirst turn on,
the user's home library. In dev_week, a library pulldown menu existed in the search masthead.
This commit adds the option to bring that pulldown menu back
by turning on the system preference OpacAddMastheadLibraryPulldown
'item-level_itypes' => C4::Context->preference('item-level_itypes'),
patronimages => C4::Context->preference("patronimages"),
singleBranchMode => C4::Context->preference("singleBranchMode"),
- XSLTDetailsDisplay => C4::Context->preference("XSLTDetailsDisplay"),
- XSLTResultsDisplay => C4::Context->preference("XSLTResultsDisplay"),
- );
+ XSLTDetailsDisplay => C4::Context->preference("XSLTDetailsDisplay"),
+ XSLTResultsDisplay => C4::Context->preference("XSLTResultsDisplay"),
+ BranchesLoop => GetBranchesLoop(),
+ );
if ( $in->{'type'} eq "intranet" ) {
$template->param(
reviewson => C4::Context->preference("reviewson"),
suggestion => "" . C4::Context->preference("suggestion"),
virtualshelves => "" . C4::Context->preference("virtualshelves"),
- OPACSerialIssueDisplayCount => C4::Context->preference("OPACSerialIssueDisplayCount"),
+ OPACSerialIssueDisplayCount => C4::Context->preference("OPACSerialIssueDisplayCount"),
+ OpacAddMastheadLibraryPulldown => C4::Context->preference("OpacAddMastheadLibraryPulldown"),
);
}
$template->param(listloop=>[{shelfname=>"Freelist", shelfnumber=>110}]);
INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('ShowPatronImageInWebBasedSelfCheck', '0', 'If ON, displays patron image when a patron uses web-based self-checkout', '', 'YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('EnableOpacSearchHistory', '1', 'Enable or disable opac search history', 'YesNo','');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('RoutingListAddReserves','1','If ON the patrons on routing lists are automatically added to holds on the issue.','','YesNo');
+INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ( 'OpacAddMastheadLibraryPulldown', '0', '', 'Adds a pulldown menu to select the library to search on the opac masthead.', 'YesNo' );
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('opacSerialDefaultTab', 'serialcollection', 'Ce paramètre définit l''onglet par défaut pour l''affichage des périodiques dans l''OPAC.', 'holdings|serialcollection|subscriptions', 'Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('RoutingListAddReserves','1','Si activé, des reservations sont automatiquement créées pour chaque lecteur de la liste de circulation d''un numéro de périodique','','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('SpecifyDueDate',1,'Autorise ou non le bibliothécaire à spécifier la date de retour dans le module circulation','','YesNo');
+INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ( 'OpacAddMastheadLibraryPulldown', '0', '', 'Adds a pulldown menu to select the library to search on the opac masthead.', 'YesNo' );
print "Upgrade to $DBversion done (added collection and collection_tracking tables for rotataing collection functionnality)\n";
SetVersion ($DBversion);
}
+$DBversion = "3.01.00.106";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ( 'OpacAddMastheadLibraryPulldown', '0', '', 'Adds a pulldown menu to select the library to search on the opac masthead.', 'YesNo' )");
+ print "Upgrade done (added OpacAddMastheadLibraryPulldown system preferences)\n";
+ SetVersion ($DBversion);
+}
=item DropAllForeignKeys($table)
<div id="fluid">
<div id="fluid-offset">
<!-- TMPL_UNLESS NAME="advsearch" --><form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform">
- <label for="masthead_search" class="left"> Search <!-- TMPL_IF name="mylibraryfirst" --> (in <!-- TMPL_VAR name="mylibraryfirst" --> only)<!-- /TMPL_IF --></label>
+ <label for="masthead_search" class="left"> Search
+ <!-- TMPL_UNLESS NAME="OpacAddMastheadLibraryPulldown" -->
+ <!-- TMPL_IF name="mylibraryfirst" --> (in <!-- TMPL_VAR name="mylibraryfirst" --> only)<!-- /TMPL_IF -->
+ <!-- /TMPL_UNLESS -->
+ </label>
+
<select name="idx" id="masthead_search" class="left" style="max-width:10em;width:10em;">
<!-- TMPL_IF NAME="ms_kw" -->
<option selected="selected" value="">Library Catalog</option>
<!-- TMPL_ELSE -->
<input type="text" id = "transl1" name="q" class="left" style="width: 35%; font-size: 111%;"/><div id="translControl"></div>
<!-- /TMPL_IF -->
- <!-- TMPL_UNLESS NAME="opac_limit_override" -->
- <!-- TMPL_IF name="mylibraryfirst" -->
- <input name="limit" value="branch:<!-- TMPL_VAR name="mylibraryfirst" -->" type="hidden" />
- <!-- /TMPL_IF -->
- <!-- /TMPL_UNLESS -->
- <!-- TMPL_IF NAME="opac_search_limit" -->
- <input name="limit" value="<!-- TMPL_VAR name="opac_search_limit" -->" type="hidden" />
- <!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="OpacAddMastheadLibraryPulldown" -->
+ <select name="limit" id="masthead_search" class="left" style="max-width:10em;width:10em;">
+ <option value="">All Libraries</option>
+ <!-- TMPL_LOOP NAME="BranchesLoop" -->
+ <option <!-- TMPL_IF NAME="selected" -->SELECTED<!-- /TMPL_IF --> value="branch:<!-- TMPL_VAR NAME='value' -->"><!-- TMPL_VAR NAME='branchname' --></option>
+ <!-- /TMPL_LOOP -->
+ </select>
+ <!-- TMPL_ELSE -->
+ <!-- TMPL_UNLESS NAME="opac_limit_override" -->
+ <!-- TMPL_IF name="mylibraryfirst" -->
+ <input name="limit" value="branch:<!-- TMPL_VAR name="mylibraryfirst" -->" type="hidden" />
+ <!-- /TMPL_IF -->
+ <!-- /TMPL_UNLESS -->
+ <!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="opac_search_limit" -->
+ <input name="limit" value="<!-- TMPL_VAR name="opac_search_limit" -->" type="hidden" />
+ <!-- /TMPL_IF -->
+
+
<input type="submit" value="Go" id="searchsubmit" class="left" />
<!-- TMPL_IF NAME="opacbookbag" --><span id="cmspan"></span><!-- /TMPL_IF -->
use strict;
sub kohaversion {
- our $VERSION = '3.01.00.105';
+ our $VERSION = '3.01.00.106';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install