Koha/koha-tmpl/intranet-tmpl/prog/en/includes/serials-search.inc
Owen Leonard 99929a7d89
Bug 34323: Enhance header search icon for more options
This patch modifies header search forms which have a "more options"
icon, adding a title attribute to the control and "aria-hidden" to the
Font Awesome icons.

I've added a bit of CSS and JS to change the appearance of the icon when
it is clicked to expand the panel of options.

To test, apply the patch and rebuild the staff interface CSS.

- Test pages which have a "more options" icon in the search header:
  - Home -> Catalog search tab, with IntranetCatalogSearchPulldown
    enabled.
  - Acquisitions -> Orders search tab
  - Authorities -> All search tabs
  - Administration -> Budgets
  - Patrons -> Patron search tab
  - Serials -> Subscription search tab
- On all these pages, hovering your mouse over the icon in the search
  form should trigger a "More options" title.
- Clicking the icon should expand the panel, and the icon should be
  now have a highlighted style.
- Clicking the icon to collapse the panel should return the icon to its
  original state.

Signed-off-by: Sam Lau <samalau@gmail.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:23:34 -03:00

73 lines
4.1 KiB
HTML

[% USE Koha %]
<!-- serials-search.inc -->
<div id="header_search" role="tablist">
<div class="tab-content">
<div id="subscription_search" role="tabpanel" class="tab-pane active">
<form action="/cgi-bin/koha/serials/serials-search.pl" method="get">
[% IF ( routing ) %]
<input type="hidden" name="routing" value="[% routing | html %]" />
[% END %]
<input type="hidden" name="searched" value="1" />
<div class="form-title">
<label class="control-label">Search subscriptions</label>
</div>
<div class="form-content">
<input type="text" class="form-control" placeholder="ISSN" size="11" name="ISSN_filter" id="ISSN_filter" value="[% ISSN_filter | html %]" />
[% IF (UNIMARC) %]
<input type="text" class="form-control" placeholder="EAN" size="11" name="EAN_filter" id="EAN_filter" value="[% EAN_filter | html %]" />
[% END %]
<input type="text" class="form-control" placeholder="Title" size="11" name="title_filter" id="title_filter" value="[% title_filter | html %]" />
<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">
<div>
<label for="callnumber_filter">Call number:</label>
<input class="form-control" type="text" id="callnumber_filter" name="callnumber_filter" placeholder="Call number" value="[% callnumber_filter | html %]">
</div>
<div>
<label for="publisher_filter">Publisher:</label>
<input class="form-control" type="text" id="publisher_filter" name="publisher_filter" placeholder="Publisher" value="[% publisher_filter | html %]">
</div>
<div>
<label for="bookseller_filter">Vendor:</label>
<input class="form-control" type="text" id="bookseller_filter" name="bookseller_filter" placeholder="Vendor" value="[% bookseller_filter | html %]">
</div>
<div>
<a href="/cgi-bin/koha/serials/serials-search.pl">Advanced search</a>
</div>
</div> <!-- /.form-extra-content -->
</form>
</div> <!-- /#subscription_search -->
[% 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 subscriptions" href="#subscription_search" aria-controls="subscription_search" aria-expanded="true" role="tab" aria-expanded="true" data-toggle="tab" class="keep_text"><i class="fa fa-book"></i> <span class="tab-title">Search subscriptions</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-upload"></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"></i> <span class="tab-title">Search catalog</span></a>
</li>
[% END %]
</ul>
</div><!-- /#header_search -->
<!-- /serials-search.inc -->