Bug 14902 - Add qualifier menu to staff side "Search the Catalog"
authorNick Clemens <nick@bywatersolutions.com>
Fri, 3 Jun 2016 16:52:01 +0000 (12:52 -0400)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 8 Jul 2016 13:57:59 +0000 (13:57 +0000)
To test:
1 - Apply patch and update dabase
2 - Check that Search the Catalog links throughout the staff interface
have not changed
3 - Set "IntranetCatalogSearchPulldown" to 'Show'
4 - Verify that 'Search the catalog' links through staff client now have
a dropdwon to  select search index

I think viewing one file each that includes updated header should be
sufficient, but please check as many as you can:

cgi-bin/koha/admin/aqbudgetperiods.pl
cgi-bin/koha/admin/admin-home.pl
cgi-bin/koha/cataloguing/addbooks.pl
cgi-bin/koha/circ/returns.pl
cgi-bin/koha/circ/circulation-home.pl
cgi-bin/koha/admin/cities.pl
cgi-bin/koha/admin/aqcontract.pl
cgi-bin/koha/admin/currency.pl
cgi-bin/koha/mainpage.pl
cgi-bin/koha/tools/letter.pl
cgi-bin/koha/members/members-home.pl
cgi-bin/koha/admin/categories.pl
cgi-bin/koha/admin/preferences.pl
cgi-bin/koha/admin/printers.pl
cgi-bin/koha/serials/serials-home.pl
cgi-bin/koha/acqui/newordersuggestion.pl
cgi-bin/koha/admin/z3950servers.pl

Sponsored by:
  Northeast Kansas Library System (http://nekls.org/)

Signed-off-by: Heather Braum <hbraum@nekls.org>
Signed-off-by: Barton Chittenden <barton@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
20 files changed:
installer/data/mysql/atomicupdate/Bug_14902_Add_IntranetCatalogSearchPulldown_pref.sql [new file with mode: 0644]
installer/data/mysql/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/cat-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/cataloging-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/checkin-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/circ-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/cities-admin-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/contracts-admin-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/currencies-admin-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/home-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/letters-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/patrons-admin-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/prefs-admin-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/printers-admin-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/suggestions-add-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/z3950-admin-search.inc
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref

diff --git a/installer/data/mysql/atomicupdate/Bug_14902_Add_IntranetCatalogSearchPulldown_pref.sql b/installer/data/mysql/atomicupdate/Bug_14902_Add_IntranetCatalogSearchPulldown_pref.sql
new file mode 100644 (file)
index 0000000..49dceb0
--- /dev/null
@@ -0,0 +1 @@
+INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('IntranetCatalogSearchPulldown','0',NULL,'Show a search field pulldown for \"Search the catalog\" boxes. ','YesNo');
index 2fb5f03..29ef9c8 100644 (file)
@@ -184,6 +184,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
 ('IncludeSeeFromInSearches','0','','Include see-from references in searches.','YesNo'),
 ('IndependentBranches','0',NULL,'If ON, increases security between libraries','YesNo'),
 ('IndependentBranchesPatronModifications','0', NULL, 'Show only modification request for the logged in branch','YesNo'),
+('IntranetCatalogSearchPulldown','0', NULL, 'Show a search field pulldown for \"Search the catalog\" boxes','YesNo'),
 ('OnSiteCheckouts','0','','Enable/Disable the on-site checkouts feature','YesNo'),
 ('OnSiteCheckoutsForce','0','','Enable/Disable the on-site for all cases (Even if a user is debarred, etc.)','YesNo'),
 ('InProcessingToShelvingCart','0','','If set, when any item with a location code of PROC is \'checked in\', it\'s location code will be changed to CART.','YesNo'),
index be36c7e..c2babc2 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Koha %]
 <div class="gradient">
 <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Fund Admin Resident Search Box -->
 
@@ -28,6 +29,7 @@
     <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">
+             [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %][% INCLUDE 'search_indexes.inc' %][% END %]
              <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="query form-text" />
                 <input type="submit" value="Submit"  class="submit" />
         </form>
index 6cc5cd1..972eb0c 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Koha %]
 <div class="gradient">
 <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Catalogue Resident Search Box -->
 <div id="header_search">
@@ -25,6 +26,7 @@
 <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">
+        [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %][% INCLUDE 'search_indexes.inc' %][% END %]
         <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="head-searchbox form-text" />
         <input type="submit" class="submit" value="Submit" />
     </form>
index da1e2df..a289b70 100644 (file)
@@ -1,4 +1,4 @@
-
+[% USE Koha %]
 <div class="gradient">
 <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Cataloging Resident Search Box -->
     <div id="header_search">
@@ -33,6 +33,7 @@
         <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">
+                [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %][% INCLUDE 'search_indexes.inc' %][% END %]
                 <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="head-searchbox form-text" />
                 <input type="submit" class="submit" value="Submit" />
             </form>
index de271c3..edaacee 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Koha %]
 <div class="gradient">
 <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Checkin Resident Search Box -->
 <div id="header_search">
@@ -6,6 +7,7 @@
 <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">
+        [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %][% INCLUDE 'search_indexes.inc' %][% END %]
         <input class="head-searchbox" type="text" name="q" id="search-form" size="40" />
         <input type="submit" class="submit" value="Submit"/>
     </form>
index 4a5dc97..7fec2dd 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Koha %]
 <div class="gradient">
 <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Circulation Resident Search Box -->
 
@@ -23,6 +24,7 @@
 <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">
+        [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %][% INCLUDE 'search_indexes.inc' %][% END %]
         <input class="head-searchbox" type="text" name="q" id="search-form" size="40" accesskey="q" />
         <input type="submit" class="submit" value="Submit"/>
     </form>
index 2b85c95..2247a49 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Koha %]
 <div class="gradient">
 <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Cities Resident Search Box -->
 <div id="header_search">
@@ -15,6 +16,7 @@
     <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">
+             [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %][% INCLUDE 'search_indexes.inc' %][% END %]
              <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="head-searchbox form-text" />
                                <input type="submit" value="Submit"  class="submit" />
                </form>
index eae3335..7837466 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Koha %]
 <div class="gradient">
 <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Patrons Admin Resident Search Box -->
 
@@ -16,6 +17,7 @@
     <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">
+             [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %][% INCLUDE 'search_indexes.inc' %][% END %]
              <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="head-searchbox form-text" />
                                <input type="submit" value="Submit"  class="submit" />
                </form>
index 6983b22..299c323 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Koha %]
 <div class="gradient">
 <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Currencies Resident Search Box -->
 <div id="header_search">
@@ -13,6 +14,7 @@
     <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">
+             [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %][% INCLUDE 'search_indexes.inc' %][% END %]
              <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="head-searchbox form-text" />
                                <input type="submit" value="Submit"  class="submit" />
                </form>
index 08902d2..be87ac2 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Koha %]
 <div class="gradient">
 <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Main page Resident Search Box -->
 
@@ -33,6 +34,7 @@
 <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">
+        [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %][% INCLUDE 'search_indexes.inc' %][% END %]
         <input type="text" name="q" id="search-form" class="head-searchbox" size="40" accesskey="q" />
         <input type="submit" class="submit" value="Submit"/>
     </form>
index 815903d..1eea7bb 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Koha %]
 <div class="gradient">
 <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Notices Resident Search Box -->
 <div id="header_search">
@@ -13,6 +14,7 @@
     <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">
+            [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %][% INCLUDE 'search_indexes.inc' %][% END %]
             <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="head-searchbox form-text" />
                                <input type="submit" name="op" value="Submit"  class="submit" />
                </form>
index d1deca7..a7e11b3 100644 (file)
     <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">
+             [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %][% INCLUDE 'search_indexes.inc' %][% END %]
              <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="head-searchbox form-text" />
-                <input type="submit" name="op" id="opac-submit" value="Submit" class="submit" />
+             <input type="submit" name="op" id="opac-submit" value="Submit" class="submit" />
         </form>
     </div>[% END %]
 
index 72cb127..d1e77a6 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Koha %]
 <div class="gradient">
 <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Patrons Admin Resident Search Box -->
 <div id="header_search">
@@ -13,6 +14,7 @@
     <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">
+            [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %][% INCLUDE 'search_indexes.inc' %][% END %]
             <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="head-searchbox form-text" />
                                <input type="submit" value="Submit"  class="submit" />
                </form>
index 9b82c4b..c7b2bba 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Koha %]
 <div class="gradient">
 <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1>
 <div id="header_search">
@@ -15,6 +16,7 @@
     <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">
+             [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %][% INCLUDE 'search_indexes.inc' %][% END %]
              <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="head-searchbox form-text" />
                                <input type="submit" value="Submit" class="submit" />
                </form>
index f3c9aaa..3bd8e28 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Koha %]
 <div class="gradient">
 <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Printers Resident Search Box -->
 <div id="header_search">
@@ -13,6 +14,7 @@
     <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">
+            [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %][% INCLUDE 'search_indexes.inc' %][% END %]
             <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="head-searchbox form-text" />
                                <input type="submit" value="Submit"  class="submit" />
                </form>
index e8b2493..86a3683 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Koha %]
 <div class="gradient">
   <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Serials Resident Search Box -->
   <div id="header_search">
@@ -22,6 +23,7 @@
       <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">
+          [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %][% INCLUDE 'search_indexes.inc' %][% END %]
           <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="head-searchbox form-text" />
           <input type="submit" value="Submit"  class="submit" />
         </form>
index 3928e25..42a231e 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Koha %]
 <div class="gradient">
 <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Suggestions Resident Search Box -->
 <div id="header_search">
@@ -18,6 +19,7 @@
     <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">
+            [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %][% INCLUDE 'search_indexes.inc' %][% END %]
             <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="head-searchbox form-text" />
                                <input type="submit" value="Submit"  class="submit" />
                </form>
index d81f60f..6723a23 100644 (file)
@@ -1,3 +1,4 @@
+[% USE Koha %]
 <div class="gradient">
 <h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin z3950 Admin Resident Search Box -->
 <div id="header_search">
@@ -15,6 +16,7 @@
     <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">
+            [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %][% INCLUDE 'search_indexes.inc' %][% END %]
             <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="head-searchbox form-text" />
                                <input type="submit" value="Submit"  class="submit" />
                </form>
index 4673641..e7da2e8 100644 (file)
@@ -149,3 +149,9 @@ Staff Client:
                  yes: "Enable"
                  no: "Don't enable"
             - audio alerts for events defined in the audio alerts section of administration.
+        -
+            - pref: IntranetCatalogSearchPulldown
+              choices:
+                  yes: Show
+                  no: "Don't show"
+            - a search field pulldown for 'Search the catalog' boxes.