From 37abbcaf4cafb0e4d9a8c9f04f862a39a567d191 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 1 Feb 2022 16:34:38 +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. Signed-off-by: Lucas Gass Signed-off-by: Jonathan Druart --- .../bootstrap/en/modules/opac-reserve.tt | 193 +++++++++--------- 1 file changed, 101 insertions(+), 92 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 2d84cdffb44..424a26bac19 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt @@ -345,112 +345,115 @@ [% 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 infoNotesInformation
- [% 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 - [% itemLoo.itemnotes | 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 %] + NotesInformation
+ [% 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 %] + [% itemLoo.itemnotes | 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 )%] @@ -472,6 +475,7 @@ [% INCLUDE 'opac-bottom.inc' %] [% BLOCK jsinclude %] [% INCLUDE 'calendar.inc' %] + [% INCLUDE 'datatables.inc' %] [% END %] -- 2.25.1