From 087cb956e0fd76a3d6138e538a8868a9ba99bda5 Mon Sep 17 00:00:00 2001 From: Owen Leonard 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 Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../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 8f2c12450c..fa3421dee1 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -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; 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 -%] - - Cancel + + Cancel - [%- IF Koha.Preference('SuspendHoldsIntranet') -%] - [%- UNLESS ( hold.found ) -%] - - [%- IF Koha.Preference('AutoResumeSuspendedHolds') -%] + [% IF Koha.Preference('SuspendHoldsIntranet') %] + [% UNLESS ( hold.found ) %] + + + [% IF Koha.Preference('AutoResumeSuspendedHolds') %] [%- 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 e44016cf97..794bb6fafa 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 @@ Confirm holds › Holds › Circulation › Koha [% END %] [% INCLUDE 'doc-head-close.inc' %] +[% Asset.css("css/holds.css") | $raw %] @@ -54,9 +56,21 @@ Catalog
  • - - Confirm holds - + [% IF ( patron ) %] + + Place holds + + [% ELSE %] + [% IF clubcount %] + + Search patrons or clubs + + [% ELSE %] + + Search patrons + + [% END %] + [% END %]
  • @@ -102,12 +116,20 @@ [% END %] - [% UNLESS ( nobiblio ) %] - [% UNLESS ( multi_hold ) %] -

    Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %]

    - [% ELSE %] -

    Confirm holds

    - [% END %] + [% UNLESS ( multi_hold ) %] +

    Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %]

    + [% ELSE %] +

    + [% IF ( patron ) %] + Place holds + [% ELSE %] + [% IF clubcount %] + Search patrons or clubs + [% ELSE %] + Search patrons + [% END %] + [% END %] +

    [% END %] [% UNLESS club OR patron OR patron.borrowernumber OR noitems OR nobiblio %] @@ -125,10 +147,12 @@ [% END %]
    - [% IF clubcount %] - - [% ELSE %] - + [% UNLESS multi_hold %] + [% IF clubcount %] + + [% ELSE %] + + [% END %] [% END %]
      @@ -250,7 +274,6 @@ [% END %] [% END %] - [% UNLESS ( multi_hold ) %]
      @@ -909,112 +932,148 @@ [% FOREACH biblioloo IN biblioloop %] [% IF ( biblioloo.reserveloop ) %] - [% IF ( multi_hold ) %] -

      - - [% biblioloo.title | html %] - -

      - [% END %] - - [% IF Koha.Preference('HoldsSplitQueue') == 'branch' %] - [% SET branchcodes = [] %] - - [% FOREACH h IN biblioloo.reserveloop %] - [% branchcodes.push( h.branchcode ) %] +
      + [% IF ( multi_hold ) %] +

      + + [% biblioloo.title | html %] + [% biblioloo.reserveloop.size | html %] [% tn('Hold', 'Holds', biblioloo.reserveloop.size) | $raw %] +

      [% 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 %] -
      - [% Branches.GetName( b ) | html %] - [% INCLUDE holds_table.inc holds=holds_by_branch %] -
      - [% END # /FOREACh b %] - [% ELSIF Koha.Preference('HoldsSplitQueue') == 'itemtype' %] - [% SET itemtypes = [] %] + [% branchcodes = branchcodes.unique %] + [% IF ( branchcodes.empty ) %] +
      + There are no holds on this title. +
      + [% 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 %] +
      +

      [% Branches.GetName( b ) | html %]

      + + [% INCLUDE holds_table.inc holds=holds_by_branch %] +
      + [% 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 %] - -
      - [% IF i %] - [% ItemTypes.GetDescription( i ) | html %] - [% ELSE %] - Any item type - [% END %] - [% INCLUDE holds_table.inc holds=holds_by_itemtype %] -
      - [% 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 %] -
      - [% Branches.GetName( b ) | html %] - [% 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 ) %] +
      + There are no holds on this title. +
      + [% ELSE %] [% FOREACH i IN itemtypes.sort %] - [% IF i %] -

      [% ItemTypes.GetDescription( i ) | html %]

      - [% ELSE %] -

      Any item type

      - [% 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 %] -
      - [% END # /FOREACH b %] - [% ELSE %] - [% INCLUDE holds_table.inc holds=biblioloo.reserveloop %] - [% END # /IF HoldsSplitQueue %] +
      + [% IF i %] +

      [% ItemTypes.GetDescription( i ) | html %]

      + [% ELSE %] +

      Any item type

      + [% END %] + [% INCLUDE holds_table.inc holds=holds_by_itemtype %] +
      + [% 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 ) %] +
      + There are no holds on this title. +
      + [% ELSE %] + + [% FOREACH b IN branchcodes.sort %] +
      +

      [% Branches.GetName( b ) | html %]

      + [% 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 %] +
      +
      + [% IF i %] + [% ItemTypes.GetDescription( i ) | html %] + [% ELSE %] + Any item type + [% END %] +
      + + [% 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 %] +
      + [% END %] +
      + [% END # /FOREACH b %] + [% END # /IF ( branchcodes.empty ) %] + + [% ELSE %] + + [% IF ( biblioloo.reserveloop.size ) %] + [% INCLUDE holds_table.inc holds=biblioloo.reserveloop %] + [% ELSE %] +
      + There are no holds on this title. +
      + [% END %] + + [% END # /IF HoldsSplitQueue %] +
      [% END # /IF biblioloo.reserveloop %] [% END # FOREACH biblioloo %] -
      - + [% END # IF reserveloop %] [% END # UNLESS patron %]