Controlled by the system preference QuickSearchShowLibraryPulldown.
Using the syspref SearchMyLibraryFirst will cause the pulldown to default to 
the logged in branch.
---
 C4/Auth.pm                                         |   14 ++++++++++++++
 installer/data/mysql/en/mandatory/sysprefs.sql     |    1 +
 .../1-Obligatoire/unimarc_standard_systemprefs.sql |    1 +
 installer/data/mysql/updatedatabase.pl             |    7 +++++++
 .../intranet-tmpl/prog/en/includes/cat-search.inc  |   12 ++++++++++--
 .../intranet-tmpl/prog/en/includes/circ-search.inc |    8 ++++++++
 .../prog/en/includes/patron-search.inc             |   12 ++++++++++--
 7 files changed, 51 insertions(+), 4 deletions(-)

diff --git a/C4/Auth.pm b/C4/Auth.pm
index 608fd9b..b8d851c 100755
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -339,6 +339,20 @@ sub get_template_and_user {
             singleBranchMode             => 
C4::Context->preference("singleBranchMode"),
             XSLTDetailsDisplay        => 
C4::Context->preference("XSLTDetailsDisplay"),
             XSLTResultsDisplay        => 
C4::Context->preference("XSLTResultsDisplay"),
+            SyndeticsClientCode          => 
C4::Context->preference("SyndeticsClientCode"),
+            SyndeticsEnabled             => 
C4::Context->preference("SyndeticsEnabled"),
+            SyndeticsCoverImages         => 
C4::Context->preference("SyndeticsCoverImages"),
+            SyndeticsTOC                 => 
C4::Context->preference("SyndeticsTOC"),
+            SyndeticsSummary             => 
C4::Context->preference("SyndeticsSummary"),
+            SyndeticsEditions            => 
C4::Context->preference("SyndeticsEditions"),
+            SyndeticsExcerpt             => 
C4::Context->preference("SyndeticsExcerpt"),
+            SyndeticsReviews             => 
C4::Context->preference("SyndeticsReviews"),
+            SyndeticsAuthorNotes         => 
C4::Context->preference("SyndeticsAuthorNotes"),
+            SyndeticsAwards              => 
C4::Context->preference("SyndeticsAwards"),
+            SyndeticsSeries              => 
C4::Context->preference("SyndeticsSeries"),
+            SyndeticsCoverImageSize      => 
C4::Context->preference("SyndeticsCoverImageSize"),
+            BranchesLoop                 => GetBranchesLoop( 
(C4::Context->userenv?C4::Context->userenv->{"branch"}:"insecure") ),
+            QuickSearchShowLibraryPulldown => 
C4::Context->preference("QuickSearchShowLibraryPulldown"),
                  );
 
     if ( $in->{'type'} eq "intranet" ) {
diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql 
b/installer/data/mysql/en/mandatory/sysprefs.sql
index e9df35e..2ed2f1d 100644
--- a/installer/data/mysql/en/mandatory/sysprefs.sql
+++ b/installer/data/mysql/en/mandatory/sysprefs.sql
@@ -274,3 +274,4 @@ INSERT INTO `systempreferences` 
(variable,value,explanation,options,type) VALUES
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES ('OPACPatronDetails','1','If OFF the patron details tab in the OPAC is 
disabled.','','YesNo');
 INSERT INTO `systempreferences` (variable,value,explanation,options,type) 
VALUES ('OPACFinesTab','1','If OFF the patron fines tab in the OPAC is 
disabled.','','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 ('QuickSearchShowLibraryPulldown', '0', '', 'Displays a library pulldown 
on the quick circulation searches to limit the search by library.', 'YesNo');
diff --git 
a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql 
b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
index 528cea1..a06ac09 100644
--- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
+++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
@@ -273,3 +273,4 @@ INSERT INTO `systempreferences` 
(variable,value,explanation,options,type) VALUES
 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 ('QuickSearchShowLibraryPulldown', '0', '', 'Displays a library pulldown 
on the quick circulation searches to limit the search by library.', 'YesNo');
diff --git a/installer/data/mysql/updatedatabase.pl 
b/installer/data/mysql/updatedatabase.pl
index 4e1d1cf..eb86c43 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -3291,6 +3291,13 @@ if (C4::Context->preference("Version") < 
TransformToNum($DBversion)) {
     SetVersion ($DBversion);
 }
 
+$DBversion = "3.01.00.XXX";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+       $dbh->do("INSERT INTO `systempreferences` 
(variable,value,options,explanation,type) VALUES 
('QuickSearchShowLibraryPulldown', '0', '', 'Displays a library pulldown on the 
quick circulation searches to limit the search by library.', 'YesNo')");
+       print "Upgrade done (added QuickSearchShowLibraryPulldown system 
preferences)\n";
+    SetVersion ($DBversion);
+}
+
 =item DropAllForeignKeys($table)
 
   Drop all foreign keys of the table $table
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc 
b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc
index 536d7ad..d9fe117 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc
@@ -82,8 +82,16 @@ YAHOO.util.Event.onContentReady("header_search", function() {
        <div id="catalog_search" class="residentsearch">
        <p class="tip">Enter search keywords:</p>
                <form action="/cgi-bin/koha/catalogue/search.pl"  method="get" 
id="cat-search-block">
-                        <input type="text" name="q" id="search-form" size="40" 
value="" title="Enter the terms you wish to search for." class="form-text" />
-                               <input type="submit" class="submit" 
value="Submit" />
+                       <input type="text" name="q" id="search-form" size="40" 
value="" title="Enter the terms you wish to search for." class="form-text" />
+                       <!-- TMPL_IF NAME="QuickSearchShowLibraryPulldown" -->
+                               <select id="masthead_search" class="left" 
name="limit">
+                                       <option  value="">All Libraries</option>
+                                       <!-- TMPL_LOOP NAME="BranchesLoop" -->
+                                               <option <!-- TMPL_IF 
NAME="selected" -->selected<!-- /TMPL_IF --> value="<!-- TMPL_VAR NAME='value' 
-->"><!-- TMPL_VAR NAME='branchname' -->
+                                       <!-- /TMPL_LOOP -->
+                               </select>
+                       <!-- /TMPL_IF -->
+                       <input type="submit" class="submit" value="Submit" />
                </form>
        </div>
        <!-- /TMPL_IF -->
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc 
b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc
index 4b8841b..f3c102d 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc
@@ -16,6 +16,14 @@
     <p class="tip">Enter search keywords:</p>
     <form action="/cgi-bin/koha/catalogue/search.pl"  method="get" 
id="cat-search-block">
         <input type="text" name="q" id="search-form" size="40" accesskey="q" />
+       <!-- TMPL_IF NAME="QuickSearchShowLibraryPulldown" -->
+               <select id="masthead_search" class="left" name="limit">
+                       <option  value="">All Libraries</option>
+                       <!-- TMPL_LOOP NAME="BranchesLoop" -->
+                               <option <!-- TMPL_IF NAME="selected" 
-->selected<!-- /TMPL_IF --> value="<!-- TMPL_VAR NAME='value' -->"><!-- 
TMPL_VAR NAME='branchname' -->
+                       <!-- /TMPL_LOOP -->
+               </select>
+       <!-- /TMPL_IF -->
         <input type="submit" class="submit" value="Submit"/>
     </form>
 </div><!-- /TMPL_IF -->
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc 
b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc
index a054829..df88707 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc
@@ -83,8 +83,16 @@ YAHOO.util.Event.onContentReady("header_search", function() {
        <div id="catalog_search" class="residentsearch" style="display:none;">
        <p class="tip">Enter search keywords:</p>
                <form action="/cgi-bin/koha/catalogue/search.pl"  method="get" 
id="cat-search-block">
-                        <input type="text" name="q" id="search-form" size="40" 
value="" title="Enter the terms you wish to search for." class="form-text" />
-                               <input type="submit" name="op" id="opac-submit" 
value="Submit" class="submit" />
+                       <input type="text" name="q" id="search-form" size="40" 
value="" title="Enter the terms you wish to search for." class="form-text" />
+                       <!-- TMPL_IF NAME="QuickSearchShowLibraryPulldown" -->
+                               <select id="masthead_search" class="left" 
name="limit">
+                                       <option  value="">All Libraries</option>
+                                       <!-- TMPL_LOOP NAME="BranchesLoop" -->
+                                               <option <!-- TMPL_IF 
NAME="selected" -->selected<!-- /TMPL_IF --> value="<!-- TMPL_VAR NAME='value' 
-->"><!-- TMPL_VAR NAME='branchname' -->
+                                       <!-- /TMPL_LOOP -->
+                               </select>
+                       <!-- /TMPL_IF -->
+                       <input type="submit" name="op" id="opac-submit" 
value="Submit" class="submit" />
                </form>
        </div><!-- /TMPL_IF -->
                        <ul>
-- 
1.5.6.5

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to