From 44be27b860cde2c91695ca56e50ed4c3fe0375ec Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Sat, 21 Mar 2015 13:41:21 -0400 Subject: [PATCH] Bug 13887: Add datatables to item specific holds table This patch adds datatables functionality to the item specific holds table To test: 1 - Apply patch 2 - Attempt to place an item specific hold for a patron 3 - Note that columns are now sortable and searchable 4 - Ensure that you can place both specific and next available holds as before Signed-off-by: Nicole Engard Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/reserve/request.tt | 162 ++++++++++-------- 1 file changed, 90 insertions(+), 72 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 04023d3005..8dbb623353 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -42,6 +42,18 @@ $(document).ready(function() { $(':radio', this).attr('checked', 'true') } }); + var my_table = $("#requestspecific").dataTable($.extend(true, {}, dataTablesDefaults, { + 'bPaginate': false, + 'bInfo': false, + "bAutoWidth": false, + })); + + //Override fieldset styling for dataTables search box + $("div.top.pager").css("margin-left","1em"); + $(".dataTables_filter label").css({ + "width":"auto", + "margin-right":"0em" + }); }); @@ -431,81 +443,86 @@ function checkMultiHold() { - - - [% IF ( item_level_itypes ) %] - - [% END %] - - - - - - [% IF itemdata_enumchron %] - - [% END %] - - - [% FOREACH itemloo IN bibitemloo.itemloop %] - [% UNLESS ( itemloo.hide ) %] - - - [% IF ( item_level_itypes ) %] - + + + [% IF ( item_level_itypes ) %] + + [% END %] + + + + + + [% IF itemdata_enumchron %] + + [% END %] + + + + + [% FOREACH itemloo IN bibitemloo.itemloop %] + [% UNLESS ( itemloo.hide ) %] + + + [% IF ( item_level_itypes ) %] + - [% END %] + [% itemloo.itypename %] + + [% END %] - - - - - - [% IF itemdata_enumchron %] - - [% END %] - + + + + + [% IF itemdata_enumchron %] + + [% END %] + - - [% END %] - [% END %] + [% END %] + + + [% END %] + [% END %] +
Place a hold on a specific item
HoldItem typeBarcodeHome libraryLast locationCall no.Copy numberVol no.Information
- [% IF ( itemloo.available ) %] - - [% ELSIF ( itemloo.override ) %] - - Requires override of hold policy - [% ELSE %] - - Cannot be put on hold - [% END %] - +
HoldItem typeBarcodeHome libraryLast locationCall no.Copy numberVol no.Information
+ [% IF ( itemloo.available ) %] + + [% ELSIF ( itemloo.override ) %] + + Requires override of hold policy + [% ELSE %] + + Cannot be put on hold + [% END %] + [% UNLESS ( noItemTypeImages ) %] [% IF ( itemloo.imageurl ) %]
[% END %] [% END %] - [% itemloo.itypename %] -
- [% itemloo.barcode %] - - [% itemloo.homebranchname %] - - [% itemloo.holdingbranchname %] - - [% itemloo.itemcallnumber %] - [% IF ( itemloo.copynumber ) %][% itemloo.copynumber %][% ELSE %] [% END %] - [% itemloo.enumchron %] - + + [% itemloo.barcode %] + + [% itemloo.homebranchname %] + + [% itemloo.holdingbranchname %] + + [% itemloo.itemcallnumber %] + + [% IF ( itemloo.copynumber ) %][% itemloo.copynumber %][% ELSE %] [% END %] + + [% itemloo.enumchron %] + [% IF ( itemloo.onloan ) %] - Due [% itemloo.date_due %] - [% ELSE %] - [% IF ( itemloo.transfertwhen ) %] - In transit from [% itemloo.transfertfrom %], - to [% itemloo.transfertto %], since [% itemloo.transfertwhen %] - [% END %] + Due [% itemloo.date_due %] + [% ELSE %] + [% IF ( itemloo.transfertwhen ) %] + In transit from [% itemloo.transfertfrom %], + to [% itemloo.transfertto %], since [% itemloo.transfertwhen %] + [% END %] [% END %] - [% IF ( itemloo.message ) %] - Unavailable (lost or missing) - [% END %] + [% IF ( itemloo.message ) %] + Unavailable (lost or missing) + [% END %] - [% IF ( itemloo.notforloan ) %] - Not for loan ([% itemloo.notforloanvalue %]) - [% END %] + [% IF ( itemloo.notforloan ) %] + Not for loan ([% itemloo.notforloanvalue %]) + [% END %] - [% IF ( itemloo.reservedate ) %] + [% IF ( itemloo.reservedate ) %] [% IF ( itemloo.nocancel ) %] Can't be cancelled when item is in transit [% ELSE %] @@ -515,13 +532,14 @@ function checkMultiHold() { [% IF ( itemloo.waitingdate ) %][% itemloo.waitingdate | $KohaDates %][% ELSE %][% IF ( itemloo.reservedate ) %][% itemloo.reservedate %][% END %][% END %]. Cancel hold [% END %] - [% ELSE %] + [% ELSE %] Not on hold - [% END %] -
[% IF ( bibitemloo.hiddencount ) %]
-- 2.39.5