From c2d9157c831cac93f14939bc4a71a1a6c68f6714 Mon Sep 17 00:00:00 2001 From: Solene Desvaux Date: Thu, 30 Jun 2022 14:50:03 +0200 Subject: [PATCH] Bug 30952: update request --- .../prog/en/modules/reserve/request.tt | 628 ++++++++---------- 1 file changed, 287 insertions(+), 341 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 86f1ca9d18..1df3d07ace 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -17,10 +17,6 @@ [% INCLUDE 'circ-search.inc' %] [% END %] [% INCLUDE 'doc-head-open.inc' %] -[% SET libraries = Branches.all %] -[% SET categories = Categories.all.unblessed %] -[% SET columns = ['name', 'cardnumber', 'dateofbirth', 'category', 'branch', 'address', 'phone'] %] -[% PROCESS "patron-search.inc" %] [% UNLESS ( multi_hold ) %] Place a hold on [% INCLUDE 'biblio-title-head.inc' %] › Holds › Circulation › Koha [% ELSE %] @@ -150,12 +146,6 @@ [% END %] -
    - [% IF Koha.Preference('showLastPatron') %][% INCLUDE 'last-borrower.inc' %][% END %] -
-
    - Help -
[% END # UNLESS multi_hold %] @@ -168,7 +158,6 @@ [% END %]
-

Holds

[% IF ( nobiblio ) %]
@@ -195,13 +184,13 @@

Hold placed by : [% nextreservsurname | html %] [% nextreservfirstname | html %] at : [% branchname | html %] , Please transfer this item.

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

Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %] [% IF biblio.author %] by [% biblio.author | html %][% END %]

+

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

[% ELSE %]

[% IF ( patron ) %] @@ -230,23 +219,22 @@

No club with this name, please, try another

[% END %] -
+
[% UNLESS multi_hold %] [% IF clubcount %] -

Search patrons or clubs

+

Search patrons or clubs

[% ELSE %] -

Search patrons

+ [% END %] [% END %]
-
+ [% END %]
[% ELSIF club %]
- Hold details +

Hold details

[% IF ( multi_hold ) %] + + [% FOREACH biblioloo IN biblioloop %] - [% UNLESS biblioloo.none_avail %] - - - - [% END %] + + [% END %] [% ELSE %] - + [% END # /IF multi_hold %] @@ -375,14 +349,14 @@ [% END %] [% UNLESS ( multi_hold ) %]
- +
[% ELSE %] - [% UNLESS Koha.Preference('item-level_itypes') %] + [% UNLESS ( item_level_itypes ) %] [% END %] @@ -403,7 +377,6 @@
  • [% biblioloo.title | html %] - [% IF biblioloo.author %] by [% biblioloo.author | html %][% END %]
  • [% IF ( biblioloo.publicationyear ) %]
  • @@ -415,9 +388,9 @@ [% END %] - [% UNLESS Koha.Preference('item-level_itypes') %] + [% UNLESS ( item_level_itypes ) %]
[% END %] @@ -466,7 +439,7 @@ [% END %] - [% IF ( no_reserves_allowed || exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted || recall ) %] + [% IF ( no_reserves_allowed || exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted ) %]
[% UNLESS ( multi_hold ) %] @@ -504,8 +477,6 @@
  • Too many holds for [% biblioloo.title | html %]: [% INCLUDE 'patron-title.inc' patron => patron no_title => 1 no_cardnumber => 1 hide_patron_infos_if_needed => 1 %] can only place a maximum of [% max_holds_for_record | html %] hold(s) on this record.
  • [% END %] [% END %] - [% ELSIF ( none_available ) %] -
  • No items available: One or more records have no items that can be held
  • [% END # /IF exceeded_maxreserves %] [% END # /UNLESS multi_hold %]
    @@ -544,25 +515,23 @@
    - Hold details +

    Hold details

    - [% FOREACH biblionumber IN biblionumbers %] - - [% END %] + + [% IF ( multi_hold ) %] + + [% FOREACH biblioloo IN biblioloop %] - [% UNLESS biblioloo.none_avail %] - - - - [% END %] + + [% END %] [% ELSE %] - + [% END # /IF multi_hold %] @@ -643,6 +612,7 @@ [% ELSE %] [% END %] + @@ -667,168 +637,138 @@
    [% IF ( patron.borrowernumber ) %] [% IF ( override_required ) %] - + [% ELSIF ( none_available ) %] - + [% ELSE %] - + [% END %] [% END %]
    - [% biblio = biblioloop.0 %] + [% FOREACH bibitemloo IN bibitemloop %] +
      + [% UNLESS ( item_level_itypes ) %] +
    1. + Item type: + [% bibitemloo.description | html %] +
    2. + [% END %] -
        - [% UNLESS Koha.Preference('item-level_itypes') %] -
      1. - Item typeX: - [% biblio.itemtype.translated_description | html %] -
      2. - [% END %] + [% IF ( bibitemloo.publicationyear ) %] +
      3. + Publication year: + [% bibitemloo.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 bibitemloo.force_hold_level == 'item' %] + (Required) + [% END %] +

    -

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

    - -
      TitleItem typePriority - [% biblioloo.itemtype.translated_description | html %] + [% biblioloo.itypename | html %] [% biblioloo.rank | html %]
    - - - - - [% 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 holds 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 - [% ELSIF itemloo.not_holdable == 'notforloan' %] - Not for loan - [% ELSE %] - [% itemloo.not_holdable | html %] + + + + + [% IF ( item_level_itypes ) %] + + [% END %] + + + + [% IF itemdata_ccode %] + + [% END %] + + + [% IF itemdata_enumchron %] + + [% END %] + + + + + + [% SET selected = 0 %] + [% FOREACH itemloo IN bibitemloo.itemloop %] + [% UNLESS ( itemloo.hide ) %] + + + [% IF ( item_level_itypes ) %] + - [% END %] - - [% END %] - - [% IF Koha.Preference('item-level_itypes') %] - [% END %] - - - - [% IF itemdata_ccode %] - [% END %] - - - [% IF itemdata_enumchron %] - [% END %] - [% IF ( itemloo.onloan ) %] - + [% END %] + - - [% END # / UNLESS itemloo.hide %] - [% END # /FOREACH itemloo %] - -
    HoldItem typeBarcodeHome libraryLast locationCollectionCall numberCopy numberVol no.InformationAllowed pickup locations
    + [% IF itemloo.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 %] + + [% END # /IF itemloo.force_hold_level %] + + [% UNLESS ( noItemTypeImages ) %] + [% IF ( itemloo.imageurl ) %]
    [% END %] [% END %] - - [% END # /IF force_hold_level %] -
    - [% IF (itemloo.pickup_locations_count > 0) %] - - [% UNLESS ( noItemTypeImages ) %] - [% IF ( itemloo.itemtype.image_location) %]
    [% END %] - [% END %] - [% itemloo.itemtype.translated_description | html %] + [% itemloo.barcode | html %]
    - [% itemloo.barcode | html %] - - [% Branches.GetName( itemloo.homebranch ) | html %] - - [% Branches.GetName( itemloo.holdingbranch ) | html %] - - [% IF ( itemloo.ccode ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => itemloo.ccode ) | html %][% END %] + [% Branches.GetName( itemloo.homebranch ) | html %] - [% itemloo.itemcallnumber | html %] - - [% IF ( itemloo.copynumber ) %][% itemloo.copynumber | html %][% ELSE %] [% END %] - - [% itemloo.enumchron | html %] + [% Branches.GetName( itemloo.holdingbranch ) | html %] - Due [% itemloo.date_due | $KohaDates as_due_date => 1 %] - [% ELSE %] + [% IF itemdata_ccode %] + + [% IF ( itemloo.ccode ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => itemloo.ccode ) | html %][% END %] + [% IF ( itemloo.transfertwhen ) %] In transit from [% Branches.GetName( itemloo.transfertfrom ) | html %], @@ -849,66 +789,86 @@ [% IF ( itemloo.waitingdate ) %] [% itemloo.waitingdate | $KohaDates %] [% ELSE %] - [% IF ( itemloo.reservedate ) %] - [% itemloo.reservedate | html %] + [% IF ( itemloo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %] + [% IF ( itemloo.canreservefromotherbranches ) %] + for [% itemloo.ReservedFor.firstname | html %] [% itemloo.ReservedFor.surname | html %] [% END %] - [% END %]. - Cancel hold - [% END # /IF itemloo.nocancel %] - [% ELSE %] - Not on hold - [% END # /IF itemloo.reservedate %] + [% 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 %] - [% 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 %]) - [% ELSIF ( itemloo.notforloanitype ) %] - Not for loan (Itemtype not for loan) + [% IF ( itemloo.notforloan ) %] + Not for loan ([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => itemloo.notforloan ) | html %]) + [% END %] +
    + [% IF (itemloo.pickup_locations_count > 0) %] + [% END %] -
    - - [% IF hiddencount %] - -

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

    - - [% END # /IF hiddencount %] +
    + + [% IF ( bibitemloo.hiddencount ) %] +
    +

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

    +
    + [% END # /IF bibitemloo.hiddencount %] + [% END # /FOREACH bibitemloo %] [% ELSE # /UNLESS multi_hold %] - - [% UNLESS Koha.Preference('item-level_itypes') %] + [% UNLESS ( item_level_itypes ) %] [% END %] + [% FOREACH biblioloo IN biblioloop %] [% IF ( biblioloo.warn ) %] @@ -918,28 +878,13 @@ [% END %] - [% END %] - - [% UNLESS Koha.Preference('item-level_itypes') %] + [% UNLESS ( item_level_itypes ) %] [% END %] @@ -986,6 +931,20 @@ [% END %] [% END %] + [% END # /FOREACH biblioloo %]
     Pickup location TitleItem typePriority InformationPickup location
    [% UNLESS ( biblioloo.warn ) %] - - [% END %] - - [% UNLESS ( biblioloo.none_avail || biblioloo.noitems ) %] - + +
    • [% biblioloo.title | html %] - [% IF biblioloo.author %] by [% biblioloo.author | html %][% END %]
    • [% IF ( biblioloo.publicationyear ) %]
    • @@ -951,9 +896,9 @@ [% END %]
    - [% biblioloo.itemtype.translated_description | html %] + [% biblioloo.itypename | html %] [% biblioloo.rank | html %] + [% UNLESS ( biblioloo.none_avail || biblioloo.noitems ) %] + + [% END %] +
    @@ -994,23 +953,15 @@
    [% IF ( patron AND patron.borrowernumber ) %] - [% IF ( multi_hold ) %] - [% IF ( override_required ) %] - - [% ELSIF ( no_bibs_available ) %] - - [% ELSIF ( none_available ) %] - - [% ELSE %] - - [% END %] + [% IF ( override_required ) %] + + [% ELSIF ( none_available ) %] + [% ELSE %] - [% IF ( override_required ) %] - - [% ELSIF ( none_available ) %] - + [% IF ( multi_hold ) %] + [% ELSE %] - + [% END %] [% END %] [% END # /IF patron %] @@ -1037,9 +988,7 @@ [% IF ( reserveloop ) %]
    [% IF ( multi_hold ) %] - [% FOREACH biblionumber IN biblionumbers %] - - [% END %] + [% END %] [% IF enqueued %] @@ -1051,10 +1000,10 @@

    Existing holds

    - +
    [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %] - [% IF hold_cancellation.count %] + [% IF hold_cancellation %] @@ -1262,23 +1211,18 @@ [% MACRO jsinclude BLOCK %] [% INCLUDE 'datatables.inc' %] - [% INCLUDE 'calendar.inc' %] [% INCLUDE 'columns_settings.inc' %] [% Asset.js("lib/hc-sticky.js") | $raw %] + [% Asset.js("js/circ-patron-search-results.js") | $raw %] [% INCLUDE 'select2.inc' %] [% Asset.js("js/holds.js") | $raw%] - - [% SET url_biblio_params = "biblionumber=" _ biblionumbers.join("&biblionumber=") %] - [% IF multi_hold %] - [% SET url_biblio_params = url_biblio_params _ "&multi_hold=1" %] - [% END %] - + [% INCLUDE 'calendar.inc' %] - - - [% PROCESS patron_search_js table_id => 'table_borrowers', categories => categories, libraries => libraries, extended_attribute_types => attribute_type_codes, columns => columns, open_on_row_click => 1, on_click_url => '/cgi-bin/koha/reserve/request.pl?' _ url_biblio_params, redirect_if_one_result => 1, redirect_url => '/cgi-bin/koha/reserve/request.pl?' _ url_biblio_params, redirect_if_attribute_equal => 'cardnumber' %] - [% END %] -- 2.17.1