Koha/koha-tmpl/intranet-tmpl/prog/en/includes/member-search-box.inc
Owen Leonard 5e6992b600
Bug 32683: Convert header search tabs to Bootstrap
This patch updates all search header include files so that they have
Bootstrap tab markup instead of jQueryUI. jQueryUI-related JavaScript is
updated to work with Bootstrap.

To test, apply the patch and rebuild the staff interface CSS. Clear your
browser cache if necessary.

Test that keyboard shortcuts work correctly: Alt-U for circulation,
Alt-R for returns, Alt-W for renewals, and Alt-Q for search. Each
shortcut should either activate the correct search tab (if present on
the page) or redirect you to that page.

Cursor focus should be automatically placed in expanded header search
form, whether it be on page load or when switching tabs.

Test search header forms with additional search options work correctly:
Clicking the "settings" icon should expand the panel with additional
fields.

Test at least one page which uses each include file:

- acquisitions-search.inc
  - Acquisitions and related pages
- adv-search.inc
  - Advanced catalog search
- authorities-search.inc
  - Authorities and related pages
  - Check that the right tab is preselected after each kind of search,
e.g. a search by "Main heading" should return a search results page
where the "Main heading" tab is preselected.
- budgets-admin-search.inc
  - Administration -> Budgets
- cat-search.inc
  - Catalog search results, bibliographic details, etc.
- cataloging-search.inc
  - Cataloging home page and cataloging search results
- checkin-search.inc
  - Circulation -> Check in
- circ-search.inc
  - Circulation -> Check out
- cities-admin-search.inc
  - Administration -> Cities and towns
- contracts-admin-search.inc
  - Acquisitions -> Vendor -> Contracts
- currencies-admin-search.inc
  - Administration -> Currencies
- desks-admin-search.inc
  - Administration -> Desks (must have UseCirculationDesks enabled)
- erm-search.inc
  - ERM (must have ERMModule enabled)
- home-search.inc
  - Staff interface home page
- letters-search.inc
  - Tools -> Notices
- patron-search-header.inc
  - Patron details, patron accounting, etc.
- patrons-admin-search.inc
  - Administratoin -> Patron categories
- prefs-admin-search.inc
  - Administration home page and system preferences
- serials-search.inc
  - Serials and related pages
- suggestions-add-search.inc
  - Not used
- z3950-admin-search.inc
  - Administration -> Z39.50 servers

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-10 12:04:08 -03:00

78 lines
3.7 KiB
HTML

<!-- member-search-box.inc -->
[% USE Branches %]
[% USE Categories %]
[% USE Koha %]
[% PROCESS 'patronfields.inc' %]
[% IF CAN_user_borrowers_edit_borrowers %]
[% IF( bs_tab_active ) %]
<div id="patron_search" role="tabpanel" class="tab-pane active">
[% ELSE %]
<div id="patron_search" role="tabpanel" class="tab-pane">
[% END %]
<form method="post" action="/cgi-bin/koha/members/member.pl">
<input type="hidden" name="quicksearch" value="1" />
<div class="form-title">
<label class="control-label">Search patrons</label>
</div>
<div class="form-content">
[% IF ( Koha.Preference('RetainPatronsSearchTerms') ) %]
<input name="searchmember" id="searchmember" class="head-searchbox form-control" type="text" placeholder="Enter patron card number or partial name" size="25" value="[% searchmember | html %]"/>
[% ELSE %]
<input name="searchmember" id="searchmember" class="head-searchbox form-control" type="text" placeholder="Enter patron card number or partial name" size="25"/>
[% END %]
<button type="button" class="form-extra-content-toggle"><i class="fa fa-sliders"></i></button>
</div>
<button type="submit"><i class="fa fa-arrow-right"></i></button>
<div class="form-extra-content">
<div>
[% INCLUDE patron_fields_dropdown search_box=1 %]
</div>
<div>
<label for="searchtype" class="control-label">Search type</label>
<select name="searchtype" id="searchtype" class="form-control">
[% IF searchtype == 'start_with' %]
<option value='start_with'>Starts with</option>
<option value='contain'>Contains</option>
[% ELSE %]
<option value='start_with'>Starts with</option>
<option value='contain'>Contains</option>
[% END %]
</select>
</div>
<div>
[% SET branches = Branches.all( selected => branchcode_filter, only_from_group => 1 ) %]
<label for="branchcode" class="control-label">Library</label>
<select name="branchcode_filter" id="branchcode" class="form-control">
[% IF branches.size != 1 %]
<option value="">Any</option>
[% END %]
[% PROCESS options_for_libraries libraries => branches %]
</select>
</div>
<div>
[% SET categories = Categories.all() %]
<label for="categorycode" class="control-label">Category</label>
<select name="categorycode_filter" id="categorycode" class="form-control">
<option value="">Any</option>
[% FOREACH category IN categories %]
[% IF category.categorycode == categorycode_filter %]
<option value="[% category.categorycode | html %]" selected="selected">[% category.description | html %]</option>
[% ELSE %]
<option value="[% category.categorycode | html %]">[% category.description | html %]</option>
[% END %]
[% END %]
</select>
</div>
</div>
</form>
</div>
[% END %]
<!-- /member-search-box.inc -->