From 9aff2e1b946c16ca903292bdb6156045e575de6c Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 25 Jan 2022 18:32:00 +0000 Subject: [PATCH] Bug 29713: Make item table when placing an item level hold sortable This patch modifies the holds page in the OPAC so that users selecting a specific item to place a hold on can sort the table of items. Note: This patch includes some whitespace changes, so diff accordingly. To test, apply the patch and go to Administration -> Circulation and fine rules to make sure at least one item type in your system has "OPAC item level holds" set to "allow." - Log in to the OPAC as a user who can place holds. - Search the catalog for items which will accept item-level holds. - Place a hold on one of the results, and click the "Show more options" link on the holds page. - Check the "specific item" radio button. - A table of items should be displayed. Confirm that the table is sortable. - Perform the same test when placing a hold on multiple titles. Confirm that each table of items is sortable. --- .../bootstrap/en/modules/opac-reserve.tt | 185 +++++++++--------- 1 file changed, 97 insertions(+), 88 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt index edc33ccf73..77547de2c6 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt @@ -345,108 +345,111 @@ [% IF bibitemloo.itemholdable %] - - - [% IF ( item_level_itypes ) %] - - [% END %] - - [% UNLESS ( singleBranchMode ) %] - - - [% END %] - [% IF ( itemdata_ccode ) %] - - [% END %] - - [% IF ( itemdata_enumchron ) %] - - [% END %] - - - - [% FOREACH itemLoo IN bibitemloo.itemLoop %] - - - + + + [% IF ( item_level_itypes ) %] - + [% END %] - - + [% UNLESS ( singleBranchMode ) %] - - + + [% END %] [% IF ( itemdata_ccode ) %] - + [% END %] - + [% IF ( itemdata_enumchron ) %] - + [% END %] - + + + + [% FOREACH itemLoo IN bibitemloo.itemLoop %] + + - [% IF ( itemLoo.message ) %] - Unavailable (lost or missing) + [% IF ( item_level_itypes ) %] + [% END %] - [% IF ( itemLoo.notforloan ) %] - Not for loan ([% itemLoo.notforloanvalue | html %]) + + [% UNLESS ( singleBranchMode ) %] + + + [% END %] + [% IF ( itemdata_ccode ) %] + + [% END %] + + [% IF ( itemdata_enumchron ) %] + [% END %] + - - [% END # / FOREACH itemLoo IN bibitemloo.itemLoop%] + for patron + [% IF ( itemLoo.waitingdate ) %] + at + [% ELSE %] + expected at + [% END %] + [% itemLoo.ExpectedAtLibrary | html %] since + [% IF ( itemLoo.waitingdate ) %] + [% itemLoo.waitingdate | $KohaDates %] + [% ELSE %] + [% IF ( itemLoo.reservedate ) %] + [% itemLoo.reservedate | html %] + [% END %] + [% END %]. + + [% ELSE %] + Not on hold + [% END # / IF ( itemLoo.reservedate )%] + + + [% END # / FOREACH itemLoo IN bibitemloo.itemLoop%] +
Select a specific item:
Copy numberItem typeBarcodeHome libraryLast locationCollectionCall numberVol infoInformation
- [% IF ( itemLoo.available ) %] - - [% ELSE %] - - - [% END %] - - [% IF ( itemLoo.copynumber ) %] - [% itemLoo.copynumber | html %] - [% END %] -
Copy number - [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %] - [% IF ( itemLoo.imageurl ) %] - - [% END %] - [% END %] - [% itemLoo.translated_description | html %] - Item type[% itemLoo.barcode | html %]Barcode[% Branches.GetName( itemLoo.homeBranchName ) | html %][% Branches.GetName( itemLoo.holdingBranchName ) | html %]Home libraryLast location [% IF ( itemLoo.ccode ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => itemLoo.ccode, opac => 1 ) | html %][% END %]Collection[% itemLoo.callNumber | html %]Call number[% itemLoo.enumchron | html %]Vol info - [% IF ( itemLoo.dateDue ) %] - Due [% itemLoo.dateDue | html %] - [% ELSIF ( itemLoo.transfertwhen ) %] - In transit from [% Branches.GetName( itemLoo.transfertfrom ) | html %] to [% Branches.GetName( itemLoo.transfertto ) | html %] since [% itemLoo.transfertwhen | html %] - [% END %] + Information
+ [% IF ( itemLoo.available ) %] + + [% ELSE %] + + + [% END %] + + [% IF ( itemLoo.copynumber ) %] + [% itemLoo.copynumber | html %] + [% END %] + + [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %] + [% IF ( itemLoo.imageurl ) %] + + [% END %] + [% END %] + [% itemLoo.translated_description | html %] + [% itemLoo.barcode | html %][% Branches.GetName( itemLoo.homeBranchName ) | html %][% Branches.GetName( itemLoo.holdingBranchName ) | html %] [% IF ( itemLoo.ccode ) %][% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => itemLoo.ccode, opac => 1 ) | html %][% END %][% itemLoo.callNumber | html %][% itemLoo.enumchron | html %] + [% IF ( itemLoo.dateDue ) %] + Due [% itemLoo.dateDue | html %] + [% ELSIF ( itemLoo.transfertwhen ) %] + In transit from [% Branches.GetName( itemLoo.transfertfrom ) | html %] to [% Branches.GetName( itemLoo.transfertto ) | html %] since [% itemLoo.transfertwhen | html %] + [% END %] - [% IF ( itemLoo.reservedate ) %] - - [% IF ( itemLoo.waitingdate ) %] - Waiting - [% ELSE %] - On hold - [% END %] - for patron - [% IF ( itemLoo.waitingdate ) %] - at - [% ELSE %] - expected at - [% END %] - [% itemLoo.ExpectedAtLibrary | html %] since - [% IF ( itemLoo.waitingdate ) %] - [% itemLoo.waitingdate | $KohaDates %] - [% ELSE %] - [% IF ( itemLoo.reservedate ) %] - [% itemLoo.reservedate | html %] + [% IF ( itemLoo.message ) %] + Unavailable (lost or missing) + [% END %] + + [% IF ( itemLoo.notforloan ) %] + Not for loan ([% itemLoo.notforloanvalue | html %]) + [% END %] + + [% IF ( itemLoo.reservedate ) %] + + [% IF ( itemLoo.waitingdate ) %] + Waiting + [% ELSE %] + On hold [% END %] - [% END %]. - - [% ELSE %] - Not on hold - [% END # / IF ( itemLoo.reservedate )%] -
[% END # / IF ( bibitemloo.itemholdable )%] @@ -468,6 +471,7 @@ [% INCLUDE 'opac-bottom.inc' %] [% BLOCK jsinclude %] [% INCLUDE 'calendar.inc' %] + [% INCLUDE 'datatables.inc' %] -- 2.20.1