From b20e566b34620479a273cda7a8060528b8277872 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 21 Apr 2022 12:10:13 +0000 Subject: [PATCH] Bug 30579: Disentangle multi-hold and single bib forms This patch simply groups the forms so that multi-hold and single hold are each in their own section While there is some duplication from this, it makes the sections easier to read and allows for more variation in the two forms To test: 1 - Place a single bib and multi bib hold in staff client 2 - Apply this patch 3 - Repeat and confirm nothing changes with this patch Signed-off-by: Andrew Fuerste-Henry --- .../prog/en/modules/reserve/request.tt | 586 ++++++++++-------- 1 file changed, 314 insertions(+), 272 deletions(-) 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 193e9038e1..cbef1ec10f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -434,28 +434,19 @@
-
- Hold details -
+ [% UNLESS ( multi_hold ) %] +
+ Hold details + - - + + - [% FOREACH biblionumber IN biblionumbers %] - - [% END %] - [% IF ( multi_hold ) %] - - - - [% FOREACH biblioloo IN biblioloop %] - - + [% FOREACH biblionumber IN biblionumbers %] + [% END %] - [% ELSE %] - [% END # /IF multi_hold %]
  1. @@ -466,63 +457,40 @@ Not defined yet [% END %]
  2. - - [% UNLESS ( multi_hold ) %] -
  3. - Estimated priority: - [% fixedRank | html %] -
  4. - [% END %] - +
  5. + Estimated priority: + [% fixedRank | html %] +
  6. - [% UNLESS ( multi_hold ) %] - - [% FOREACH pickup_location IN multi_pickup_locations %] - - [% END %] - [% END %]
  7. - - [% UNLESS ( multi_hold ) %] - [% IF Koha.Preference('AllowHoldItemTypeSelection') %] -
  8. - - -
  9. - [% END %] - [% END # /UNLESS multi_hold %] - + [% IF Koha.Preference('AllowHoldItemTypeSelection') %] +
  10. + + +
  11. + [% END %] [% IF ( reserve_in_future ) %]
  12. [% END %] - -
  13. - - -
  14. - - [% UNLESS ( multi_hold ) %]
  15. [% IF force_hold_level == 'item' %] @@ -544,246 +512,324 @@ [% ELSE %] [% END %] - [% END # /UNLESS multi_hold %] +
  16. + + +
  17. A non priority hold doesn't prevent a current checkout from renewing
- - [% UNLESS ( multi_hold ) %] -
- [% IF ( patron.borrowernumber ) %] - [% IF ( override_required ) %] - - [% ELSIF ( none_available ) %] - - [% ELSE %] - - [% END %] +
+ [% IF ( patron.borrowernumber ) %] + [% IF ( override_required ) %] + + [% ELSIF ( none_available ) %] + + [% ELSE %] + [% END %] -
+ [% END %] +
- [% biblio = biblioloop.0 %] + [% biblio = biblioloop.0 %] -
    - [% UNLESS Koha.Preference('item-level_itypes') %] -
  1. - Item typeX: - [% biblio.itemtype.translated_description | html %] -
  2. - [% END %] +
      + [% UNLESS Koha.Preference('item-level_itypes') %] +
    1. + Item typeX: + [% biblio.itemtype.translated_description | html %] +
    2. + [% END %] - [% IF ( biblio.biblioitem.publicationyear ) %] -
    3. - Publication year: - [% biblio.biblioitem.publicationyear | html %] -
    4. - [% END %] -
    + [% IF ( biblio.biblioitem.publicationyear ) %] +
  3. + Publication year: + [% biblio.biblioitem.publicationyear | html %] +
  4. + [% END %] +
-

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

- - - - - - - [% IF Koha.Preference('item-level_itypes') %] - - [% END %] - - - - [% IF itemdata_ccode %] - - [% END %] - - - [% IF itemdata_enumchron %] - - [% END %] - - - - - [% SET selected = 0 %] - [% FOREACH itemloo IN biblio.itemloop %] - [% UNLESS ( itemloo.hide ) %] - - - - [% END # / UNLESS itemloo.hide %] - [% END # /FOREACH itemloo %] - -
HoldAllowed pickup locationsItem typeBarcodeHome libraryLast locationCollectionCall numberCopy numberVol no.Information
- [% IF force_hold_level == 'record' # Patron has placed a record level hold previously for this record %] - - - Hold must be record level - - [% ELSIF ( itemloo.available ) %] - - [% ELSIF ( itemloo.override ) %] - - - [% ELSE %] - - - [% IF itemloo.not_holdable %] - [% IF itemloo.not_holdable == 'damaged' %] - Item damaged - [% ELSIF itemloo.not_holdable == 'ageRestricted' %] - Age restricted - [% ELSIF itemloo.not_holdable == 'tooManyHoldsForThisRecord' %] - Exceeded max holds per record - [% ELSIF itemloo.not_holdable == 'tooManyReservesToday' %] - Daily hold limit reached for patron - [% ELSIF itemloo.not_holdable == 'tooManyReserves' %] - Too many holds - [% ELSIF itemloo.not_holdable == 'notReservable' %] - Not holdable - [% ELSIF itemloo.not_holdable == 'cannotReserveFromOtherBranches' %] - Patron is from different library - [% ELSIF itemloo.not_holdable == 'branchNotInHoldGroup' %] - Cannot place hold from patron's library - [% ELSIF itemloo.not_holdable == 'itemAlreadyOnHold' %] - Patron already has hold for this item - [% ELSIF itemloo.not_holdable == 'cannotBeTransferred' %] - Cannot be transferred to pickup library - [% ELSIF itemloo.not_holdable == 'pickupNotInHoldGroup' %] - Only pickup locations within the same hold group are allowed - [% ELSIF itemloo.not_holdable == 'noReservesAllowed' %] - No reserves are allowed on this item - [% ELSIF itemloo.not_holdable == 'libraryNotPickupLocation' %] - Library is not a pickup location - [% ELSIF itemloo.not_holdable == 'no_valid_pickup_location' %] - No valid pickup location - [% ELSE %] - [% itemloo.not_holdable | html %] - [% END %] +

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

+ + + + + + + [% IF Koha.Preference('item-level_itypes') %] + + [% END %] + + + + [% IF itemdata_ccode %] + + [% END %] + + + [% IF itemdata_enumchron %] + + [% END %] + + + + + [% SET selected = 0 %] + [% FOREACH itemloo IN biblio.itemloop %] + [% UNLESS ( itemloo.hide ) %] + + - - [% IF Koha.Preference('item-level_itypes') %] - + + [% END # /IF force_hold_level %] + + + [% IF Koha.Preference('item-level_itypes') %] - + [% END %] + + + + [% IF itemdata_ccode %] - [% IF itemdata_ccode %] - - [% END %] + [% END %] + + + [% IF itemdata_enumchron %] + [% END %] + [% IF ( itemloo.onloan ) %] + - [% IF itemdata_enumchron %] - - [% END %] - [% IF ( itemloo.onloan ) %] - + + [% END # / UNLESS itemloo.hide %] + [% END # /FOREACH itemloo %] + +
HoldAllowed pickup locationsItem typeBarcodeHome libraryLast locationCollectionCall numberCopy numberVol no.Information
+ [% IF force_hold_level == 'record' # Patron has placed a record level hold previously for this record %] + + + Hold must be record level + + [% ELSIF ( itemloo.available ) %] + + [% ELSIF ( itemloo.override ) %] + + + [% ELSE %] + + + [% IF itemloo.not_holdable %] + [% IF itemloo.not_holdable == 'damaged' %] + Item damaged + [% ELSIF itemloo.not_holdable == 'ageRestricted' %] + Age restricted + [% ELSIF itemloo.not_holdable == 'tooManyHoldsForThisRecord' %] + Exceeded max holds per record + [% ELSIF itemloo.not_holdable == 'tooManyReservesToday' %] + Daily hold limit reached for patron + [% ELSIF itemloo.not_holdable == 'tooManyReserves' %] + Too many holds + [% ELSIF itemloo.not_holdable == 'notReservable' %] + Not holdable + [% ELSIF itemloo.not_holdable == 'cannotReserveFromOtherBranches' %] + Patron is from different library + [% ELSIF itemloo.not_holdable == 'branchNotInHoldGroup' %] + Cannot place hold from patron's library + [% ELSIF itemloo.not_holdable == 'itemAlreadyOnHold' %] + Patron already has hold for this item + [% ELSIF itemloo.not_holdable == 'cannotBeTransferred' %] + Cannot be transferred to pickup library + [% ELSIF itemloo.not_holdable == 'pickupNotInHoldGroup' %] + Only pickup locations within the same hold group are allowed + [% ELSIF itemloo.not_holdable == 'noReservesAllowed' %] + No reserves are allowed on this item + [% ELSIF itemloo.not_holdable == 'libraryNotPickupLocation' %] + Library is not a pickup location + [% ELSIF itemloo.not_holdable == 'no_valid_pickup_location' %] + No valid pickup location + [% ELSE %] + [% itemloo.not_holdable | html %] [% END %] - - [% END # /IF force_hold_level %] - - [% IF (itemloo.pickup_locations_count > 0) %] - - [% END %] - - [% UNLESS ( noItemTypeImages ) %] - [% IF ( itemloo.itemtype.image_location) %]
[% END %] [% END %] - [% itemloo.itemtype.translated_description | html %] -
+ [% IF (itemloo.pickup_locations_count > 0) %] + + [% END %] + - [% itemloo.barcode | html %] - - [% Branches.GetName( itemloo.homebranch ) | html %] + [% UNLESS ( noItemTypeImages ) %] + [% IF ( itemloo.itemtype.image_location) %]
[% END %] + [% END %] + [% itemloo.itemtype.translated_description | html %]
+ [% itemloo.barcode | html %] + + [% Branches.GetName( itemloo.homebranch ) | html %] + + [% Branches.GetName( itemloo.holdingbranch ) | html %] + - [% Branches.GetName( itemloo.holdingbranch ) | html %] + [% IF ( itemloo.ccode ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => itemloo.ccode ) | html %][% END %] - [% IF ( itemloo.ccode ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => itemloo.ccode ) | html %][% END %] - + [% itemloo.itemcallnumber | html %] + + [% IF ( itemloo.copynumber ) %][% itemloo.copynumber | html %][% ELSE %] [% END %] + - [% itemloo.itemcallnumber | html %] + [% itemloo.enumchron | html %] + Due [% itemloo.date_due | $KohaDates as_due_date => 1 %] + [% ELSE %] - [% IF ( itemloo.copynumber ) %][% itemloo.copynumber | html %][% ELSE %] [% END %] - - [% itemloo.enumchron | html %] - - Due [% itemloo.date_due | $KohaDates as_due_date => 1 %] - [% ELSE %] - - [% IF ( itemloo.transfertwhen ) %] - In transit from [% Branches.GetName( itemloo.transfertfrom ) | html %], - to [% Branches.GetName( itemloo.transfertto ) | html %], since [% itemloo.transfertwhen | html %] - [% END %] - [% END %] + [% IF ( itemloo.transfertwhen ) %] + In transit from [% Branches.GetName( itemloo.transfertfrom ) | html %], + to [% Branches.GetName( itemloo.transfertto ) | html %], since [% itemloo.transfertwhen | html %] + [% END %] + [% END %] - [% IF ( itemloo.reservedate ) %] - [% IF ( itemloo.nocancel ) %] - Can't be cancelled when item is in transit + [% IF ( itemloo.reservedate ) %] + [% IF ( itemloo.nocancel ) %] + Can't be cancelled when item is in transit + [% ELSE %] + [% IF ( itemloo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %] + [% IF ( itemloo.canreservefromotherbranches ) %] + for [% itemloo.ReservedFor.firstname | html %] [% itemloo.ReservedFor.surname | html %] + [% END %] + [% IF ( itemloo.waitingdate ) %]at[% ELSE %]expected at[% END %] + [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since + [% IF ( itemloo.waitingdate ) %] + [% itemloo.waitingdate | $KohaDates %] [% ELSE %] - [% IF ( itemloo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %] - [% IF ( itemloo.canreservefromotherbranches ) %] - for [% itemloo.ReservedFor.firstname | html %] [% itemloo.ReservedFor.surname | html %] + [% IF ( itemloo.reservedate ) %] + [% itemloo.reservedate | html %] [% END %] - [% IF ( itemloo.waitingdate ) %]at[% ELSE %]expected at[% END %] - [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since - [% IF ( itemloo.waitingdate ) %] - [% itemloo.waitingdate | $KohaDates %] - [% ELSE %] - [% IF ( itemloo.reservedate ) %] - [% itemloo.reservedate | html %] - [% END %] - [% END %]. - Cancel hold - [% END # /IF itemloo.nocancel %] - [% ELSE %] - Not on hold - [% END # /IF itemloo.reservedate %] + [% END %]. + Cancel hold + [% END # /IF itemloo.nocancel %] + [% ELSE %] + Not on hold + [% END # /IF itemloo.reservedate %] - [% IF itemloo.item_level_holds == "N" %] -
Item level hold not allowed from OPAC - [% ELSIF itemloo.item_level_holds == "F" %] -
Item level hold forced from OPAC - [% END %] + [% IF itemloo.item_level_holds == "N" %] +
Item level hold not allowed from OPAC + [% ELSIF itemloo.item_level_holds == "F" %] +
Item level hold forced from OPAC + [% END %] - [% IF ( itemloo.itemlost ) %] - [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => itemloo.itemlost ) | html %] - [% END %] + [% IF ( itemloo.itemlost ) %] + [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => itemloo.itemlost ) | html %] + [% END %] - [% IF ( itemloo.damaged ) %] - [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => itemloo.damaged ) | html %] - [% END %] + [% IF ( itemloo.damaged ) %] + [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => itemloo.damaged ) | html %] + [% END %] - [% IF ( itemloo.withdrawn ) %] - [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => itemloo.withdrawn ) | html %] - [% END %] + [% IF ( itemloo.withdrawn ) %] + [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => itemloo.withdrawn ) | html %] + [% END %] + + [% IF ( itemloo.notforloan ) %] + Not for loan ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => itemloo.notforloan ) | html %]) + [% END %] +
+ + [% IF hiddencount %] + +

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

+ + [% END # /IF hiddencount %] + +
+ [% IF ( patron AND patron.borrowernumber ) %] + [% IF ( override_required ) %] + + [% ELSIF ( none_available ) %] + + [% ELSE %] + + [% END %] + [% END # /IF patron %] +
+ + + [% ELSE # Multi-hold %] +
+ Hold details +
+ + + + + [% FOREACH biblionumber IN biblionumbers %] + + [% END %] + + + + [% FOREACH biblioloo IN biblioloop %] + + + [% END %] + +
    + +
  1. + Patron: + [% IF ( patron.borrowernumber ) %] + [% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %]) + [% ELSE %] + Not defined yet + [% END %] +
  2. + +
  3. + + +
  4. +
  5. + + +
  6. + + + [% IF ( reserve_in_future ) %] +
  7. + + +
  8. + [% END %] + +
  9. + + +
  10. + + +
  11. + + + A non priority hold doesn't prevent a current checkout from renewing +
  12. +
- [% IF ( itemloo.notforloan ) %] - Not for loan ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => itemloo.notforloan ) | html %]) - [% END %] -
- - [% IF hiddencount %] - -

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

- - [% END # /IF hiddencount %] - - [% ELSE # /UNLESS multi_hold %] @@ -877,7 +923,6 @@ [% END # /FOREACH biblioloo %]
- [% END # /UNLESS multi_hold %]
[% IF ( patron AND patron.borrowernumber ) %] @@ -886,17 +931,14 @@ [% ELSIF ( none_available ) %] [% ELSE %] - [% IF ( multi_hold ) %] - - [% ELSE %] - - [% END %] + [% END %] [% END # /IF patron %]
- [% END %] + [% END %] + [% END %] [% UNLESS ( patron ) %] [% UNLESS borrowers %] -- 2.30.2