From 807a787d527cc93b53e5fc953bbf054c0d670b5f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 2 May 2022 12:48:32 +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 | 190 +++++++++--------- 2 files changed, 103 insertions(+), 94 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 49a5ce8767..b81dea3f1f 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -880,6 +880,13 @@ fieldset { font-size: 110%; font-weight: bold; margin-left: 1em; + + label { + display: inline-block; + float: none; + margin: .2em; + width: auto; + } } li { 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 a216bc58e4..30d47f645c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -437,9 +437,9 @@ [% UNLESS ( multi_hold ) %] -
- Hold details -
+ +
+ Hold details @@ -463,10 +463,6 @@ Estimated priority: [% fixedRank | html %] -
  • - - -
  • [% IF ( reserve_in_future ) %]
  • @@ -484,52 +480,57 @@ A non priority hold doesn't prevent a current checkout from renewing
  • -
    - - - -
      -
    1. - - -
    2. - [% IF Koha.Preference('AllowHoldItemTypeSelection') %] -
    3. - - -
    4. - [% END %] - [% IF remaining_holds_for_record > 1 %] -
    5. - - -
    6. - [% ELSE %] - - [% END %] -
    -
    +
  • + + +
  • + +
    + +
    + + + +
      +
    1. + + +
    2. + [% IF Koha.Preference('AllowHoldItemTypeSelection') %] +
    3. + + +
    4. + [% END %] + [% IF remaining_holds_for_record > 1 %] +
    5. + + +
    6. + [% ELSE %] + + [% END %]
    [% IF ( patron.borrowernumber ) %] @@ -542,6 +543,20 @@ [% END %] [% END %]
    +
    + +
    + +
    + + + [% IF force_hold_level == 'item' %] + Required + [% END %] + [% biblio = biblioloop.0 %] @@ -561,13 +576,6 @@ [% END %] -

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

    - @@ -602,9 +610,9 @@ Hold must be record level [% ELSIF ( itemloo.available ) %] - + [% ELSIF ( itemloo.override ) %] - + [% ELSE %] @@ -647,7 +655,7 @@
    [% IF (itemloo.pickup_locations_count > 0) %] -
    [% IF hiddencount %] - -

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

    - +

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

    [% END # /IF hiddencount %]
    @@ -771,8 +777,8 @@ [% END %] [% END # /IF patron %]
    - -
    +
    + [% ELSE # Multi-hold %]
    Hold details @@ -803,10 +809,6 @@ [% END %] -
  • - - -
  • - [% IF ( reserve_in_future ) %]
  • @@ -836,6 +837,11 @@ A non priority hold doesn't prevent a current checkout from renewing
  • + +
  • + + +
  • @@ -943,10 +949,10 @@ [% END %] [% END # /IF patron %]
    - - - [% END %] - [% END %] + + + [% END # /UNLESS ( multi_hold ) %] + [% END # /UNLESS club OR patron... %] [% UNLESS ( patron ) %] [% UNLESS borrowers %] @@ -1256,15 +1262,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(); }); @@ -1283,13 +1282,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); $('.clubalert, .holdalert').addClass('hide'); @@ -1388,6 +1380,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.20.1