Bug 28816: Improve the display of multiple holds during hold process
This patch updates the appearance of the "confirm holds" page, shown during the process of placing a hold for someone in the staff interface. Most of the changes affect the appearance of the page when placing multiple holds on titles which have one or more holds on them already. The changes are intended to make the page clearer and easier to scan, especially when placing multiple holds at once. Also changed: The page heading when placing multiple holds now changes based on whether you've selected a patron or not. It says "Search patrons or clubs" when it's waiting for a patron/club selection. It says "Place holds" after the patron/club has been selected. This is instead of "Confirm holds" on both pages. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Go to Administration -> System preferences and set HoldsSplitQueue to "nothing." - Perform a search in the staff client catalog and place multiple holds titles from that result set on hold for a patron. - Perform the same search and select one or more of the titles you selected before in addition to one or more titles with no holds. - After clicking the "Place hold" button you should see a page with the heading "Search patrons or clubs" showing information about existing holds. This section of the page should be clear and readable, with clear distinction between each section of information about each hold. - Test this page again under each different option for the "HoldsSplitQueue" system preference by changing the preference and reloading the page. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
d5215670c9
commit
087cb956e0
4 changed files with 218 additions and 106 deletions
36
koha-tmpl/intranet-tmpl/prog/css/src/holds.scss
Normal file
36
koha-tmpl/intranet-tmpl/prog/css/src/holds.scss
Normal file
|
@ -0,0 +1,36 @@
|
|||
.hold_title {
|
||||
border: 1px solid #b9d8d9;
|
||||
border-bottom-color: darken( #b9d8d9, 15% );
|
||||
border-top-color: lighten( #b9d8d9, 10% );
|
||||
border-radius: 5px;
|
||||
margin: .5em 0;
|
||||
padding-bottom: 1em;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.holds_table {
|
||||
margin-bottom: 1em;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.holds_by_library,
|
||||
.holds_by_itemtype {
|
||||
margin-bottom: 1em;
|
||||
margin-left: 1em;
|
||||
|
||||
&:last-child {
|
||||
.holds_table {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.holds_by_library {
|
||||
.itemtype_holds {
|
||||
color: #5D6A8A;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
|
@ -936,6 +936,12 @@ fieldset {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
table {
|
||||
display: inline-block;
|
||||
font-size: 105%;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
|
@ -2502,6 +2508,10 @@ td {
|
|||
font-size: 105%;
|
||||
line-height: 200%;
|
||||
|
||||
h3 & {
|
||||
font-size: 70%;
|
||||
}
|
||||
|
||||
a,
|
||||
span {
|
||||
background-color: #E4ECF5;
|
||||
|
|
|
@ -190,15 +190,22 @@
|
|||
[%- END -%]
|
||||
[%- END -%]
|
||||
<td>
|
||||
<a class="cancel-hold" title="Cancel hold" data-borrowernumber="[% hold.borrowernumber | html %]" data-biblionumber="[% hold.biblionumber | html %]" data-id="[% hold.reserve_id | html %]" href="request.pl?action=cancel&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]">
|
||||
<img src="[% interface | html %]/[% theme | html %]/img/x.png" alt="Cancel" />
|
||||
<a class="btn btn-default btn-xs cancel-hold" data-borrowernumber="[% hold.borrowernumber | html %]" data-biblionumber="[% hold.biblionumber | html %]" data-id="[% hold.reserve_id | html %]" href="request.pl?action=cancel&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&reserve_id=[% hold.reserve_id | html %]&date=[% hold.date | html %]">
|
||||
<i class="fa fa-trash" aria-hidden="true"></i> Cancel
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
[%- IF Koha.Preference('SuspendHoldsIntranet') -%]
|
||||
[%- UNLESS ( hold.found ) -%]
|
||||
<input type="button" value="[% IF ( hold.suspend ) %]Unsuspend[% ELSE %]Suspend[% END %]" onclick="window.location.href='request.pl?action=toggleSuspend&reserve_id=[% hold.reserve_id | html %]&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&date=[% hold.date | html %]&suspend_until=' + $('#suspend_until_[% hold.reserve_id | html %]').val()" />
|
||||
[%- IF Koha.Preference('AutoResumeSuspendedHolds') -%]
|
||||
[% IF Koha.Preference('SuspendHoldsIntranet') %]
|
||||
[% UNLESS ( hold.found ) %]
|
||||
<button class="btn btn-default btn-xs" onclick="window.location.href='request.pl?action=toggleSuspend&reserve_id=[% hold.reserve_id | html %]&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&date=[% hold.date | html %]&suspend_until=' + $('#suspend_until_[% hold.reserve_id | html %]').val()">
|
||||
[% IF ( hold.suspend ) %]
|
||||
<i class="fa fa-play" aria-hidden="true"></i> Unsuspend
|
||||
[% ELSE %]
|
||||
<i class="fa fa-pause" aria-hidden="true"></i> Suspend
|
||||
[% END %]
|
||||
</button>
|
||||
|
||||
[% IF Koha.Preference('AutoResumeSuspendedHolds') %]
|
||||
<label for="suspend_until_[% hold.reserve_id | html %]">[% IF ( hold.suspend ) %] on [% ELSE %] until [% END %]</label>
|
||||
<input type="text" name="suspend_until_[% hold.reserve_id | html %]" id="suspend_until_[% hold.reserve_id | html %]" size="10" value="[% hold.suspend_until | $KohaDates %]" class="suspend_until_datepicker" />
|
||||
[%- ELSE -%]
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
[% USE AuthorisedValues %]
|
||||
[% USE Price %]
|
||||
[% USE TablesSettings %]
|
||||
[% PROCESS 'i18n.inc' %]
|
||||
[% SET footerjs = 1 %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
[% UNLESS ( multi_hold ) %]
|
||||
|
@ -18,6 +19,7 @@
|
|||
<title>Confirm holds › Holds › Circulation › Koha</title>
|
||||
[% END %]
|
||||
[% INCLUDE 'doc-head-close.inc' %]
|
||||
[% Asset.css("css/holds.css") | $raw %]
|
||||
</head>
|
||||
|
||||
<body id="circ_request" class="catalog">
|
||||
|
@ -54,9 +56,21 @@
|
|||
<a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" aria-current="page">
|
||||
Confirm holds
|
||||
</a>
|
||||
[% IF ( patron ) %]
|
||||
<a href="#" aria-current="page">
|
||||
Place holds
|
||||
</a>
|
||||
[% ELSE %]
|
||||
[% IF clubcount %]
|
||||
<a href="#" aria-current="page">
|
||||
Search patrons or clubs
|
||||
</a>
|
||||
[% ELSE %]
|
||||
<a href="#" aria-current="page">
|
||||
Search patrons
|
||||
</a>
|
||||
[% END %]
|
||||
[% END %]
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
@ -102,12 +116,20 @@
|
|||
</div>
|
||||
[% END %]
|
||||
|
||||
[% UNLESS ( nobiblio ) %]
|
||||
[% UNLESS ( multi_hold ) %]
|
||||
<h1>Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %]</h1>
|
||||
[% ELSE %]
|
||||
<h1>Confirm holds</h1>
|
||||
[% END %]
|
||||
[% UNLESS ( multi_hold ) %]
|
||||
<h1>Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %]</h1>
|
||||
[% ELSE %]
|
||||
<h1>
|
||||
[% IF ( patron ) %]
|
||||
Place holds
|
||||
[% ELSE %]
|
||||
[% IF clubcount %]
|
||||
Search patrons or clubs
|
||||
[% ELSE %]
|
||||
Search patrons
|
||||
[% END %]
|
||||
[% END %]
|
||||
</h1>
|
||||
[% END %]
|
||||
|
||||
[% UNLESS club OR patron OR patron.borrowernumber OR noitems OR nobiblio %]
|
||||
|
@ -125,10 +147,12 @@
|
|||
</div>
|
||||
[% END %]
|
||||
<fieldset class="brief">
|
||||
[% IF clubcount %]
|
||||
<label>Search patrons or clubs</label>
|
||||
[% ELSE %]
|
||||
<label>Search patrons</label>
|
||||
[% UNLESS multi_hold %]
|
||||
[% IF clubcount %]
|
||||
<label>Search patrons or clubs</label>
|
||||
[% ELSE %]
|
||||
<label>Search patrons</label>
|
||||
[% END %]
|
||||
[% END %]
|
||||
<div id="circ_holds_select" class="toptabs">
|
||||
<ul>
|
||||
|
@ -250,7 +274,6 @@
|
|||
[% END %]
|
||||
</li>
|
||||
[% END %]
|
||||
</ol>
|
||||
[% UNLESS ( multi_hold ) %]
|
||||
<fieldset class="action">
|
||||
<input type="submit" value="Place hold" />
|
||||
|
@ -909,112 +932,148 @@
|
|||
|
||||
[% FOREACH biblioloo IN biblioloop %]
|
||||
[% IF ( biblioloo.reserveloop ) %]
|
||||
[% IF ( multi_hold ) %]
|
||||
<h3>
|
||||
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">
|
||||
[% biblioloo.title | html %]
|
||||
</a>
|
||||
</h3>
|
||||
[% END %]
|
||||
|
||||
[% IF Koha.Preference('HoldsSplitQueue') == 'branch' %]
|
||||
[% SET branchcodes = [] %]
|
||||
|
||||
[% FOREACH h IN biblioloo.reserveloop %]
|
||||
[% branchcodes.push( h.branchcode ) %]
|
||||
<div class="hold_title" id="hold_title_[% biblioloo.biblionumber | html %]">
|
||||
[% IF ( multi_hold ) %]
|
||||
<h3>
|
||||
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">
|
||||
[% biblioloo.title | html %]
|
||||
</a> <span class="number_box"><span>[% biblioloo.reserveloop.size | html %] [% tn('Hold', 'Holds', biblioloo.reserveloop.size) | $raw %]</span></span>
|
||||
</h3>
|
||||
[% END %]
|
||||
[% branchcodes = branchcodes.unique %]
|
||||
|
||||
[% FOREACH b IN branchcodes.sort %]
|
||||
[% SET holds_by_branch = [] %]
|
||||
[% IF Koha.Preference('HoldsSplitQueue') == 'branch' %]
|
||||
|
||||
[% SET branchcodes = [] %]
|
||||
|
||||
[% FOREACH h IN biblioloo.reserveloop %]
|
||||
[% IF h.branchcode == b %]
|
||||
[% holds_by_branch.push( h ) %]
|
||||
[% END %]
|
||||
[% branchcodes.push( h.branchcode ) %]
|
||||
[% END %]
|
||||
<fieldset>
|
||||
<legend>[% Branches.GetName( b ) | html %]</legend>
|
||||
[% INCLUDE holds_table.inc holds=holds_by_branch %]
|
||||
</fieldset>
|
||||
[% END # /FOREACh b %]
|
||||
[% ELSIF Koha.Preference('HoldsSplitQueue') == 'itemtype' %]
|
||||
[% SET itemtypes = [] %]
|
||||
[% branchcodes = branchcodes.unique %]
|
||||
[% IF ( branchcodes.empty ) %]
|
||||
<div class="note">
|
||||
There are no holds on this title.
|
||||
</div>
|
||||
[% ELSE %]
|
||||
|
||||
[% FOREACH h IN biblioloo.reserveloop %]
|
||||
[% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
|
||||
[% itemtypes.push( hold_itemtype ) %]
|
||||
[% END %]
|
||||
[% itemtypes = itemtypes.unique %]
|
||||
[% FOREACH b IN branchcodes.sort %]
|
||||
[% SET holds_by_branch = [] %]
|
||||
[% FOREACH h IN biblioloo.reserveloop %]
|
||||
[% IF h.branchcode == b %]
|
||||
[% holds_by_branch.push( h ) %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
<div class="holds_by_library">
|
||||
<h4>[% Branches.GetName( b ) | html %]</h4>
|
||||
|
||||
[% INCLUDE holds_table.inc holds=holds_by_branch %]
|
||||
</div>
|
||||
[% END # /FOREACh b %]
|
||||
[% END # /IF ( branchcodes.empty ) %]
|
||||
|
||||
[% ELSIF Koha.Preference('HoldsSplitQueue') == 'itemtype' %]
|
||||
|
||||
[% SET itemtypes = [] %]
|
||||
|
||||
[% FOREACH i IN itemtypes.sort %]
|
||||
[% SET holds_by_itemtype = [] %]
|
||||
[% FOREACH h IN biblioloo.reserveloop %]
|
||||
[% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
|
||||
[% IF hold_itemtype == i %]
|
||||
[% holds_by_itemtype.push( h ) %]
|
||||
[% END %]
|
||||
[% itemtypes.push( hold_itemtype ) %]
|
||||
[% END %]
|
||||
|
||||
<fieldset>
|
||||
[% IF i %]
|
||||
<legend>[% ItemTypes.GetDescription( i ) | html %]</legend>
|
||||
[% ELSE %]
|
||||
<legend>Any item type</legend>
|
||||
[% END %]
|
||||
[% INCLUDE holds_table.inc holds=holds_by_itemtype %]
|
||||
</fieldset>
|
||||
[% END # /FOREACH i %]
|
||||
[% ELSIF Koha.Preference('HoldsSplitQueue') == 'branch_itemtype' %]
|
||||
[% SET branchcodes = [] %]
|
||||
|
||||
[% FOREACH h IN biblioloo.reserveloop %]
|
||||
[% branchcodes.push( h.branchcode ) %]
|
||||
[% END %]
|
||||
[% branchcodes = branchcodes.unique %]
|
||||
|
||||
[% FOREACH b IN branchcodes.sort %]
|
||||
<fieldset>
|
||||
<legend>[% Branches.GetName( b ) | html %]</legend>
|
||||
[% SET holds_by_branch = [] %]
|
||||
[% FOREACH h IN biblioloo.reserveloop %]
|
||||
[% IF h.branchcode == b %]
|
||||
[% holds_by_branch.push( h ) %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% SET itemtypes = [] %]
|
||||
[% FOREACH h IN holds_by_branch %]
|
||||
[% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
|
||||
[% itemtypes.push( hold_itemtype ) %]
|
||||
[% END %]
|
||||
[% itemtypes = itemtypes.unique %]
|
||||
[% itemtypes = itemtypes.unique %]
|
||||
[% IF ( itemtypes.empty ) %]
|
||||
<div class="note">
|
||||
There are no holds on this title.
|
||||
</div>
|
||||
[% ELSE %]
|
||||
|
||||
[% FOREACH i IN itemtypes.sort %]
|
||||
[% IF i %]
|
||||
<h3>[% ItemTypes.GetDescription( i ) | html %]</h3>
|
||||
[% ELSE %]
|
||||
<h3>Any item type</h3>
|
||||
[% END %]
|
||||
|
||||
[% SET holds_by_itemtype = [] %]
|
||||
[% FOREACH h IN holds_by_branch %]
|
||||
[% FOREACH h IN biblioloo.reserveloop %]
|
||||
[% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
|
||||
[% IF hold_itemtype == i %]
|
||||
[% holds_by_itemtype.push( h ) %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% INCLUDE holds_table.inc holds=holds_by_itemtype %]
|
||||
[% END %]
|
||||
</fieldset>
|
||||
[% END # /FOREACH b %]
|
||||
[% ELSE %]
|
||||
[% INCLUDE holds_table.inc holds=biblioloo.reserveloop %]
|
||||
[% END # /IF HoldsSplitQueue %]
|
||||
|
||||
<div class="holds_by_itemtype">
|
||||
[% IF i %]
|
||||
<h4>[% ItemTypes.GetDescription( i ) | html %]</h4>
|
||||
[% ELSE %]
|
||||
<h4>Any item type</h4>
|
||||
[% END %]
|
||||
[% INCLUDE holds_table.inc holds=holds_by_itemtype %]
|
||||
</div>
|
||||
[% END # /FOREACH i %]
|
||||
[% END # /IF ( itemtypes.empty ) %]
|
||||
|
||||
[% ELSIF Koha.Preference('HoldsSplitQueue') == 'branch_itemtype' %]
|
||||
[% SET branchcodes = [] %]
|
||||
|
||||
[% FOREACH h IN biblioloo.reserveloop %]
|
||||
[% branchcodes.push( h.branchcode ) %]
|
||||
[% END %]
|
||||
[% branchcodes = branchcodes.unique %]
|
||||
[% IF ( branchcodes.empty ) %]
|
||||
<div class="note">
|
||||
There are no holds on this title.
|
||||
</div>
|
||||
[% ELSE %]
|
||||
|
||||
[% FOREACH b IN branchcodes.sort %]
|
||||
<div class="holds_by_library">
|
||||
<h4 class="library_holds">[% Branches.GetName( b ) | html %]</h4>
|
||||
[% SET holds_by_branch = [] %]
|
||||
[% FOREACH h IN biblioloo.reserveloop %]
|
||||
[% IF h.branchcode == b %]
|
||||
[% holds_by_branch.push( h ) %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% SET itemtypes = [] %]
|
||||
[% FOREACH h IN holds_by_branch %]
|
||||
[% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
|
||||
[% itemtypes.push( hold_itemtype ) %]
|
||||
[% END %]
|
||||
[% itemtypes = itemtypes.unique %]
|
||||
|
||||
[% FOREACH i IN itemtypes.sort %]
|
||||
<div class="holds_by_itemtype">
|
||||
<h5 class="itemtype_holds">
|
||||
[% IF i %]
|
||||
[% ItemTypes.GetDescription( i ) | html %]
|
||||
[% ELSE %]
|
||||
Any item type
|
||||
[% END %]
|
||||
</h5>
|
||||
|
||||
[% SET holds_by_itemtype = [] %]
|
||||
[% FOREACH h IN holds_by_branch %]
|
||||
[% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %]
|
||||
[% IF hold_itemtype == i %]
|
||||
[% holds_by_itemtype.push( h ) %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% INCLUDE holds_table.inc holds=holds_by_itemtype %]
|
||||
</div> <!-- /.holds_by_itemtype -->
|
||||
[% END %]
|
||||
</div> <!-- /.holds_by_library -->
|
||||
[% END # /FOREACH b %]
|
||||
[% END # /IF ( branchcodes.empty ) %]
|
||||
|
||||
[% ELSE %]
|
||||
|
||||
[% IF ( biblioloo.reserveloop.size ) %]
|
||||
[% INCLUDE holds_table.inc holds=biblioloo.reserveloop %]
|
||||
[% ELSE %]
|
||||
<div class="note">
|
||||
There are no holds on this title.
|
||||
</div>
|
||||
[% END %]
|
||||
|
||||
[% END # /IF HoldsSplitQueue %]
|
||||
</div> <!-- /hold_title -->
|
||||
[% END # /IF biblioloo.reserveloop %]
|
||||
[% END # FOREACH biblioloo %]
|
||||
</fieldset> <!-- /.rows -->
|
||||
</form> <!-- /name=TTime -->
|
||||
</form> <!-- /#existing_holds -->
|
||||
[% END # IF reserveloop %]
|
||||
[% END # UNLESS patron %]
|
||||
|
||||
|
|
Loading…
Reference in a new issue