Bug 16324: Move item search into header
authorAleisha <aleishaamohia@hotmail.com>
Thu, 21 Apr 2016 22:49:29 +0000 (22:49 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 8 Jul 2016 14:19:35 +0000 (14:19 +0000)
This patch makes the Search button in the header into a dropdown that holds the Advanced search and the Item search.
I have rewritten this patch to be independent of Bug 16323 since that patch is so controversial.

To test:
1) Confirm that Advanced search and Item search are both under the 'Search' dropdown menu in the header and both links work as expected

Sponsored-by: Catalyst IT
Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Note that the CAN_user_catalogue test is useless. If a librarian does
not have it, (s)he cannot access to the staff interface.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/includes/header.inc

index e71c99f..a266643 100644 (file)
@@ -4,7 +4,13 @@
         <ul id="toplevelmenu" class="nav">
             [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]<li><a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a></li>[% END %]
             [% IF ( CAN_user_borrowers ) %]<li><a href="/cgi-bin/koha/members/members-home.pl">Patrons</a></li>[% END %]
-            [% IF ( CAN_user_catalogue ) %]<li><a href="/cgi-bin/koha/catalogue/search.pl">Search</a></li>[% END %]
+            <li class="dropdown">
+                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Search <b class="caret"></b></a>
+                <ul class="dropdown-menu">
+                    [% IF ( CAN_user_catalogue ) %]<li><a href="/cgi-bin/koha/catalogue/search.pl">Advanced search</a></li>
+                    <li><a href="/cgi-bin/koha/catalogue/itemsearch.pl">Item search</a></li>[% END %]
+                </ul>
+            </li>
             [% IF ( intranetbookbag ) %]
             <li><a href="#" id="cartmenulink">Cart<span id="basketcount"></span></a></li>
             [% END %]