From c26f61c5091a2c3407072d9601145ad4aa47a13f 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 | 670 ++++++++---------- 1 file changed, 310 insertions(+), 360 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 348180deb5..93a8f4281e 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 %] @@ -86,12 +82,6 @@ [% END %] -
    - [% IF Koha.Preference('showLastPatron') %][% INCLUDE 'last-borrower.inc' %][% END %] -
-
    - Help -
[% END # UNLESS multi_hold %] @@ -104,7 +94,6 @@ [% END %]
-

Holds

[% IF ( nobiblio ) %]
@@ -131,13 +120,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 ) %] @@ -166,23 +155,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 %] @@ -311,14 +285,14 @@ [% END %] [% UNLESS ( multi_hold ) %]
- +
[% ELSE %] - [% UNLESS Koha.Preference('item-level_itypes') %] + [% UNLESS ( item_level_itypes ) %] [% END %] @@ -339,7 +313,6 @@
  • [% biblioloo.title | html %] - [% IF biblioloo.author %] by [% biblioloo.author | html %][% END %]
  • [% IF ( biblioloo.publicationyear ) %]
  • @@ -351,9 +324,9 @@ [% END %] - [% UNLESS Koha.Preference('item-level_itypes') %] + [% UNLESS ( item_level_itypes ) %]
[% END %] @@ -403,7 +376,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 ) %] @@ -425,8 +398,6 @@
  • No items are available to be placed on hold.
  • [% ELSIF ( maxreserves ) %]
  • Too many holds: [% patron.firstname | html %] [% patron.surname | html %] has too many holds.
  • - [% ELSIF ( recall ) %] -
  • [% patron.firstname | html %] [% patron.surname | html %] has already placed a recall on this item.
  • [% END # /IF exceeded_maxreserves %] [% ELSE # UNLESS multi_hold %] @@ -441,8 +412,6 @@
  • Too many holds for [% biblioloo.title | html %]: [% patron.firstname | html %] [% patron.surname | html %] 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 %]
    @@ -481,25 +450,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 %] @@ -580,6 +547,7 @@ [% ELSE %] [% END %] + @@ -604,248 +572,244 @@
    [% 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 %] + + [% IF itemdata_enumchron %] + + [% END %] + [% IF ( itemloo.onloan ) %] + + - - [% 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 %], - 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 - [% ELSE %] - [% IF ( itemloo.waitingdate ) %]Waiting[% ELSE %]On hold[% END %] - [% IF ( itemloo.canreservefromotherbranches ) %] - for [% itemloo.ReservedFor.firstname | html %] [% itemloo.ReservedFor.surname | html %] + [% itemloo.itemcallnumber | html %] + + [% 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 %] - [% IF ( itemloo.waitingdate ) %]at[% ELSE %]expected at[% END %] - [% Branches.GetName( itemloo.ExpectedAtLibrary ) | html %] since - [% IF ( itemloo.waitingdate ) %] - [% itemloo.waitingdate | $KohaDates %] + [% END %] + + [% IF ( itemloo.reservedate ) %] + [% IF ( itemloo.nocancel ) %] + Can't be cancelled when item is in transit [% 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 ) %] @@ -855,28 +819,13 @@ [% END %] - [% END %] - - [% UNLESS Koha.Preference('item-level_itypes') %] + [% UNLESS ( item_level_itypes ) %] [% END %] @@ -924,6 +873,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 ) %]
    • @@ -888,9 +837,9 @@ [% END %]
    - [% biblioloo.itemtype.translated_description | html %] + [% biblioloo.itypename | html %] [% biblioloo.rank | html %] + [% UNLESS ( biblioloo.none_avail || biblioloo.noitems ) %] + + [% END %] +
    @@ -932,23 +895,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 %] @@ -975,9 +930,7 @@ [% IF ( reserveloop ) %]
    [% IF ( multi_hold ) %] - [% FOREACH biblionumber IN biblionumbers %] - - [% END %] + [% END %] [% IF enqueued %] @@ -989,10 +942,10 @@

    Existing holds

    - +
    [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %] - [% IF hold_cancellation.count %] + [% IF hold_cancellation %] @@ -1200,23 +1153,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