From 9a178077dbcb80c364e633c4540c1234ea594112 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 | 191 +++++++++--------- 2 files changed, 104 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 2f84696730..960ae39bc3 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 c0acbf807b..b5304f562e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -435,9 +435,9 @@ [% UNLESS ( multi_hold ) %] -
- Hold details -
+ +
+ Hold details @@ -461,10 +461,6 @@ Estimated priority: [% fixedRank | html %] -
  • - - -
  • [% IF ( reserve_in_future ) %]
  • @@ -482,52 +478,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 ) %] @@ -540,6 +541,20 @@ [% END %] [% END %]
    +
    + +
    + +
    + + + [% IF force_hold_level == 'item' %] + Required + [% END %] + [% biblio = biblioloop.0 %] @@ -559,13 +574,6 @@ [% END %] -

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

    - @@ -600,9 +608,9 @@ Hold must be record level [% ELSIF ( itemloo.available ) %] - + [% ELSIF ( itemloo.override ) %] - + [% ELSE %] @@ -645,7 +653,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 %]
    @@ -769,8 +775,8 @@ [% END %] [% END # /IF patron %]
    - -
    +
    + [% ELSE # Multi-hold %]
    Hold details @@ -801,10 +807,6 @@ [% END %] -
  • - - -
  • - [% IF ( reserve_in_future ) %]
  • @@ -834,6 +835,11 @@ A non priority hold doesn't prevent a current checkout from renewing
  • + +
  • + + +
  • @@ -941,10 +947,10 @@ [% END %] [% END # /IF patron %]
    - - - [% END %] - [% END %] + + + [% END # /UNLESS ( multi_hold ) %] + [% END # /UNLESS club OR patron... %] [% UNLESS ( patron ) %] [% UNLESS borrowers %] @@ -1250,15 +1256,9 @@ $(this).find("input.focus").focus(); } }); - 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(); }); @@ -1277,13 +1277,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'); @@ -1382,6 +1375,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