Bugzilla – Attachment 125711 Details for
Bug 28816
Improve the display of multiple holds during hold process
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28816: Improve the display of multiple holds during hold process
Bug-28816-Improve-the-display-of-multiple-holds-du.patch (text/plain), 26.15 KB, created by
Owen Leonard
on 2021-10-04 17:54:33 UTC
(
hide
)
Description:
Bug 28816: Improve the display of multiple holds during hold process
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-10-04 17:54:33 UTC
Size:
26.15 KB
patch
obsolete
>From b52d004f6382b9c3e3b0ae0aa44d29d1229b4f14 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 5 Aug 2021 18:02:29 +0000 >Subject: [PATCH] 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> >--- > .../intranet-tmpl/prog/css/src/holds.scss | 36 +++ > .../prog/css/src/staff-global.scss | 10 + > .../prog/en/includes/holds_table.inc | 19 +- > .../prog/en/modules/reserve/request.tt | 259 +++++++++++------- > 4 files changed, 218 insertions(+), 106 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/css/src/holds.scss > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/holds.scss b/koha-tmpl/intranet-tmpl/prog/css/src/holds.scss >new file mode 100644 >index 0000000000..99f9b54082 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/holds.scss >@@ -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; >+ } >+} >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 5110580427..debfddcbbe 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -927,6 +927,12 @@ fieldset { > } > } > } >+ >+ table { >+ display: inline-block; >+ font-size: 105%; >+ margin: 0; >+ } > } > > p { >@@ -2460,6 +2466,10 @@ td { > font-size: 105%; > line-height: 200%; > >+ h3 & { >+ font-size: 70%; >+ } >+ > a, > span { > background-color: #E4ECF5; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >index 516b04f322..a712bfa4c7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >@@ -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 -%] >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 14cc35a319..100725be23 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -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" /> >@@ -911,112 +934,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 %] >+ <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 %] > >- [% IF Koha.Preference('HoldsSplitQueue') == 'branch' %] >- [% SET branchcodes = [] %] >+ [% IF Koha.Preference('HoldsSplitQueue') == 'branch' %] > >- [% FOREACH h IN biblioloo.reserveloop %] >- [% branchcodes.push( h.branchcode ) %] >- [% END %] >- [% branchcodes = branchcodes.unique %] >+ [% SET branchcodes = [] %] > >- [% FOREACH b IN branchcodes.sort %] >- [% SET holds_by_branch = [] %] > [% 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 = [] %] >- >- [% FOREACH h IN biblioloo.reserveloop %] >- [% SET hold_itemtype = h.object.item.effective_itemtype || h.itemtype %] >- [% itemtypes.push( hold_itemtype ) %] >- [% END %] >- [% itemtypes = itemtypes.unique %] >+ [% branchcodes = branchcodes.unique %] >+ [% IF ( branchcodes.empty ) %] >+ <div class="note"> >+ There are no holds on this title. >+ </div> >+ [% ELSE %] >+ >+ [% 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 %] > >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28816
:
123525
|
123535
|
125711
|
126020