From 2b7727b9a615361a084813b64e977de64c28278c Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 23 Sep 2022 15:47:24 +0000 Subject: [PATCH] Bug 30579: (follow-up) Update layout to make hold any vs. hold item clearer This patch alters the structure of the hold for a little more in order to make it clear that "Hold next available" and "Hold specific item" are two mutually-exclusive options. 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). Perform the same tests as before: - Confirm you can successfully place single or multiple items on hold - Confirm that when placing a single hold the next available options are grouped - Confirm pickup location, specific item type, and number of holds all work for next available - Confirm item level holds save pickup location correctly --- .../prog/css/src/staff-global.scss | 7 ++ .../prog/en/modules/reserve/request.tt | 77 ++++++++++--------- 2 files changed, 46 insertions(+), 38 deletions(-) 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 9a111db1eb..c4e714de88 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -882,6 +882,13 @@ fieldset { margin-left: 1em; } + label { + display: inline-block; + float: none; + margin: .2em; + width: auto; + } + li { clear: left; float: left; 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 8a0a2fdf1e..c96d895806 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -505,9 +505,9 @@ [% UNLESS ( multi_hold ) %] -
- Hold details -
+ +
+ Hold details [% FOREACH biblionumber IN biblionumbers %] @@ -532,10 +532,6 @@ [% fixedRank | html %] -
  • - - -
  • [% IF ( reserve_in_future ) %]
  • @@ -554,6 +550,10 @@ A non priority hold doesn't prevent a current checkout from renewing
  • +
  • + + +
  • @@ -602,7 +602,6 @@ [% END %] -
    @@ -616,7 +615,20 @@ [% END %] [% END %]
    +
    + +
    +
    + + + [% IF force_hold_level == 'item' %] + (Required) + [% END %] + [% biblio = biblioloop.0 %]
      @@ -635,12 +647,6 @@ [% END %]
    -

    - Place a hold on a specific item - [% IF force_hold_level == 'item' %] - (Required) - [% END %] -

    @@ -676,9 +682,9 @@ Hold must be record level [% ELSIF ( itemloo.available ) %] - + [% ELSIF ( itemloo.override ) %] - + [% ELSE %] @@ -723,7 +729,7 @@
    [% IF (itemloo.pickup_locations_count > 0) %] -
    [% IF hiddencount %] - -

    - Show all items ([% hiddencount | html %] hidden) -

    - +

    + Show all items ([% hiddencount | html %] hidden) +

    [% END # /IF hiddencount %] [% ELSE # /UNLESS multi_hold %] @@ -977,8 +981,8 @@ [% END %] [% END # /IF patron %]
    - -
    + + [% END %] [% UNLESS ( patron ) %] @@ -1289,15 +1293,8 @@ } - function ToggleHoldsToPlace() { - if ( $("#requestany").prop('checked') ) { - $("#holds_to_place_count,#pickup,#itemtype").prop('disabled', false); - } else { - $("#holds_to_place_count,#pickup,#itemtype").prop('disabled', true); - } - } ToggleHoldsToPlace(); - $("#requestany").on('change', function(){ + $(".requestany").on('change', function(){ ToggleHoldsToPlace(); }); @@ -1316,12 +1313,6 @@ "sDom": '<"top pager"ilf>t', })); - //Override fieldset styling for dataTables search box - $("div.top.pager").css("margin-left","1em"); - $(".dataTables_filter label").css({ - "width":"auto", - "margin-right":"0em" - }); $("#club-request-form").on("submit", function() { let $t = $(this); @@ -1421,6 +1412,16 @@ }); }); + function ToggleHoldsToPlace() { + if ( $("#requestany").prop('checked') ) { + $("#holds_to_place_count, #pickup, #itemtype").prop('disabled', false); + $(".requestspecific").prop("disabled", true ); + } else { + $("#holds_to_place_count, #pickup, #itemtype").prop('disabled', true); + $(".requestspecific").prop("disabled", false ); + } + } + function check( table ) { var msg = ""; -- 2.30.2