Koha/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-search.inc
Owen Leonard 086810633b
Bug 34135: Show the icons for selected tab to the left of the search bar in the staff interface
This patch modifies header search forms so that the form label has the
same icon used by the "tab" link.

The patch also improves the responsive behavior of the header search by
using the icon as the form label when the browser window is narrow
enough to hide the label text.

I've added the "aria-hidden" attribute to other icons in the modified
templates and made the "fa-fw" class consistent for all tab icons.

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

View the header search form at various browser sizes to confirm that
content is shown and hidden correctly. Test at least one page which uses
each of the modified header search includes:

 - Staff client home page
 - Acquisitions -> Acquisitions home
   - Vendor ->
     - Basket -> Add to basket -> From suggestion
     - Contracts
 - Administration ->
   - Budgets
   - Currencies
   - Desks (with UseCirculationDesks enabled)
   - System preferences
   - Z39.50/SRU servers
 - Catalog advanced search
   - Search results
 - Authorities -> Authorities home
 - Cataloging -> Cataloging home
 - Circulation -> Check out
 - E-resource management (with ERMModule enabled)
 - Patrons -> Patrons home
 - Serials -> Serials home
 - Tools -> Notices

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-09-01 11:43:47 -03:00

64 lines
3.4 KiB
HTML

[% USE Koha %]
[% USE Branches %]
<!-- budgets-admin-search.inc -->
<div id="header_search" role="tablist">
<div class="tab-content">
<div id="budgets_search" role="tabpanel" class="tab-pane active">
<form action="/cgi-bin/koha/admin/aqbudgets.pl" method="post">
<input type="hidden" name="budget_period_id" value="[% budget_period_id | html %]" />
<div class="form-title">
<label class="control-label"><span class="control-text">Search funds</span> <i class="fa-solid fa-fw fa-credit-card"></i></label>
</div>
<div class="form-content">
<input class="query form-control" type="text" name="filter_budgetname" id="filter_budgetname" value="[% filter_budgetname | html %]" placeholder="Search funds" />
<button type="button" class="form-extra-content-toggle" title="More options"><i class="form-extra-content-icon fa-solid fa-sliders" aria-hidden="true"></i></button>
</div>
<button type="submit"><i class="fa fa-arrow-right"></i></button>
<div class="form-extra-content">
<label for="filter_budgetbranch">Library</label>
<select name="filter_budgetbranch" id="filter_budgetbranch" class="form-control">
<option value="">All libraries</option>
[% FOREACH branchloo IN Branches.all( selected => selected_branchcode ) %]
[% IF branchloo.selected %]
<option value="[% branchloo.branchcode | html %]" selected="selected">[% branchloo.branchname | html %]</option>
[% ELSE %]
<option value="[% branchloo.branchcode | html %]" >[% branchloo.branchname | html %]</option>
[% END %]
[% END %]
</select>
</div>
</form>
</div>
[% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
[% INCLUDE 'patron-search-box.inc' %]
[% END %]
[% IF ( CAN_user_catalogue ) %]
[% INCLUDE 'catalogue-search-box.inc' %]
[% END %]
</div><!-- /.tab-content -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active">
<a title="Search funds" href="#budgets_search" aria-controls="budgets_search" aria-expanded="true" role="tab" data-toggle="tab" class="keep_text"><i class="fa-solid fa-fw fa-credit-card"></i> <span class="tab-title">Search funds</span></a>
</li>
[% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
<li role="presentation">
<a title="Check out" href="#circ_search" aria-controls="circ_search" role="tab" data-toggle="tab" class="keep_text"><i class="fa fa-fw fa-upload" aria-hidden="true"></i> <span class="tab-title">Check out</span></a>
</li>
[% END %]
[% IF ( CAN_user_catalogue ) %]
<li role="presentation">
<a title="Search catalog" href="#catalog_search" aria-controls="catalog_search" role="tab" data-toggle="tab" class="keep_text"><i class="fa fa-fw fa-search" aria-hidden="true"></i> <span class="tab-title">Search catalog</span></a>
</li>
[% END %]
</ul>
</div><!-- /#header_search -->
<!-- /budgets-admin-search.inc -->