From 125b8706858cbd86676d90f6e0a90c4a4c955a9a Mon Sep 17 00:00:00 2001 From: Owen Leonard <oleonard@myacpl.org> Date: Tue, 11 Feb 2020 15:10:48 +0000 Subject: [PATCH] Bug 24627: Correct style of clubs search results during hold process This patch updates some markup and CSS so that the process of selecting a club from search results during the hold process looks the same as when selecting a patron: Club names should be links (like patron names are) and the table row should have a hover color to help indicate that it is clickable. This patch also changes the markup of the Patrons/Clubs tabs a little bit to make the information clearer: Superfluous Bootstrap-related tab markup has been removed, and the patron and club search results have been moved into their respective tab containers. This means that if you search for a patron but then switch to the clubs tab the patron list doesn't still display. To test, apply the patch and rebuild the staff client CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client) - You should have more than one patron club defined. - Begin the process of placing a hold on a title. - Test the process of searching for both patrons and clubs. - In each case the name (patron or club) should be an active link. - Hovering your mouse over the table rows should change the row background to yellow. - Clicking the other tab at this stage should hide the search results from your last search. - Whether you click the linked name or elsewhere in the table row you should be correctly redirected to the next step in the holds process. --- koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss | 2 +- .../intranet-tmpl/prog/css/src/staff-global.scss | 6 ++ .../en/includes/circ-patron-search-results.inc | 3 +- .../intranet-tmpl/prog/en/includes/clubs-table.inc | 4 +- .../prog/en/modules/circ/circulation.tt | 1 + .../prog/en/modules/reserve/request.tt | 89 +++++++++++----------- 6 files changed, 54 insertions(+), 51 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss b/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss index f30ed516b06..c468050b087 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss @@ -275,7 +275,7 @@ tr { } } -.table_borrowers { +.selections-table { tr { &:hover { td { diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss index 5e02ed1d3c7..caa2de3db88 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -2765,6 +2765,12 @@ li { } } +.toptabs { + .ui-tabs-panel { + background: #FFF none; + } +} + .authref { font-style: normal; text-indent: 4em; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc index 8b34bd6c592..50821d14a86 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-patron-search-results.inc @@ -1,6 +1,5 @@ [% USE KohaDates %] -<legend>Patron selection</legend> -<table id="table_borrowers" class="table_borrowers"> +<table id="table_borrowers" class="selections-table"> <thead> <tr> <th>Name</th> diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/clubs-table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/clubs-table.inc index 06869538aad..8d429551272 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/clubs-table.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/clubs-table.inc @@ -1,4 +1,4 @@ -<table id="clubs-table"> +<table id="clubs-table" class="selections-table"> <thead> <tr> <th>Name</th> @@ -29,7 +29,7 @@ [% ELSE %] <tr> [% END %] - <td>[% c.name | html %]</td> + <td><a href="[% data_url | uri %]">[% c.name | html %]</a></td> <td>[% c.club_template.name | html %]</td> <td>[% c.description | html %]</td> [% UNLESS destination == 'holds' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 1eeb19e3aff..830ea6a2cd8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -488,6 +488,7 @@ [% INCLUDE 'patron-toolbar.inc' %] <fieldset id="circ_circulation_selectborrower"> + <legend>Patron selection</legend> [% INCLUDE 'circ-patron-search-results.inc' destination = "circ" %] </fieldset> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index fede00d3ec6..3a9ae0031a5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -89,57 +89,54 @@ [% END %] <fieldset class="brief"> <label>Search Patrons or clubs</label> - <div id="circ_holds_select"> - <ul class="nav nav-tabs" role="tablist"> - <li role="presentation"><a href="#holds_patronsearch_pane" aria-controls="holds_patronsearch_pane" role="tab" data-toggle="tab">Patrons</a></li> - <li role="presentation"><a href="#holds_clubsearch_pane" aria-controls="holds_clubsearch_pane" role="tab" data-toggle="tab">Clubs</a></li> + <div id="circ_holds_select" class="toptabs"> + <ul> + <li><a href="#holds_patronsearch_pane">Patrons</a></li> + <li><a href="#holds_clubsearch_pane">Clubs</a></li> </ul> - <div class="tab-content"> - <div role="tabpanel" class="tab-pane" id="holds_patronsearch_pane"> - <form id="holds_patronsearch" action="request.pl?biblionumber=[% biblionumber | html %]" method="post"> - <div class="hint">Enter patron card number or partial name:</div> - <input type="text" size="40" id="patron" class="focus" name="findborrower" autocomplete="off" /> - <input type="submit" value="Search" /> - [% IF multi_hold %] - <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/> - <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> - [% ELSE %] - <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> - [% END %] + <div id="holds_patronsearch_pane"> + <form id="holds_patronsearch" action="request.pl?biblionumber=[% biblionumber | html %]" method="post"> + <div class="hint">Enter patron card number or partial name:</div> + <input type="text" size="40" id="patron" class="focus" name="findborrower" autocomplete="off" /> + <input type="submit" value="Search" /> + [% IF multi_hold %] + <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/> + <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> + [% ELSE %] + <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> + [% END %] - [% IF ( multi_hold ) %] - <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/> - <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> - [% END %] - </form> <!-- /#holds_patronsearch --> - </div> - <div role="tabpanel" class="tab-pane" id="holds_clubsearch_pane"> - <form id="holds_clubsearch" action="request.pl?biblionumber=[% biblionumber | html %]" method="post"> - <div class="hint">Enter club id or partial name:</div> - <input type="text" size="40" id="club" class="focus" name="findclub" autocomplete="off" /> - <input type="submit" value="Search" /> - [% IF multi_hold %] - <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/> - <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> - [% ELSE %] - <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> - [% END %] + [% IF ( multi_hold ) %] + <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/> + <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> + [% END %] + </form> <!-- /#holds_patronsearch --> + [% IF borrowers %] + [% INCLUDE 'circ-patron-search-results.inc' destination = "holds" %] + [% END %] + </div> + <div id="holds_clubsearch_pane"> + <form id="holds_clubsearch" action="request.pl?biblionumber=[% biblionumber | html %]" method="post"> + <div class="hint">Enter club id or partial name:</div> + <input type="text" size="40" id="club" class="focus" name="findclub" autocomplete="off" /> + <input type="submit" value="Search" /> + [% IF multi_hold %] + <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/> + <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> + [% ELSE %] + <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> + [% END %] - [% IF ( multi_hold ) %] - <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/> - <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> - [% END %] - </form> <!-- /#holds_patronsearch --> - </div> + [% IF ( multi_hold ) %] + <input type="hidden" name="multi_hold" value="[% multi_hold | html %]"/> + <input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> + [% END %] + </form> <!-- /#holds_patronsearch --> + [% IF clubs %] + [% INCLUDE 'clubs-table.inc' destination = "holds" %] + [% END %] </div> </div> - <p> - [% IF borrowers %] - [% INCLUDE 'circ-patron-search-results.inc' destination = "holds" %] - [% ELSIF clubs %] - [% INCLUDE 'clubs-table.inc' destination = "holds" %] - [% END %] - </p> </fieldset> [% ELSIF club %] <div class="dialog alert hide clubalert"> -- 2.11.0