From b406abeb8be035678f3ec71905b1a76c3e2e25ef Mon Sep 17 00:00:00 2001 From: Nick Clemens <nick@quecheelibrary.org> 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 --- .../prog/en/modules/reserve/request.tt | 39 +++++++++++++------- 1 file changed, 25 insertions(+), 14 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 db044b5..5b0d19c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -5,7 +5,9 @@ [% ELSE %] <title>Koha › Circulation › Holds › Confirm holds</title> [% END %] +<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> [% INCLUDE 'doc-head-close.inc' %] +[% INCLUDE 'datatables.inc' %] [% INCLUDE 'calendar.inc' %] <script type="text/javascript"> // <![CDATA[ @@ -24,6 +26,13 @@ $(document).ready(function() { [% IF AutoResumeSuspendedHolds %] $(".suspend_until_datepicker, .datepickerfrom, .datepickerto").datepicker("option", "minDate", 1); [% END %] + + var my_table = $("#requestspecific").dataTable($.extend(true, {}, dataTablesDefaults, { + 'bPaginate': false, + 'bInfo': false, + "bAutoWidth": false, + })); + }); function check() { @@ -395,21 +404,23 @@ function checkMultiHold() { <table id="requestspecific"> <caption>Place a hold on a specific item</caption> + <thead> <tr> - <th>Hold</th> - [% IF ( item_level_itypes ) %] - <th>Item type</th> - [% END %] - <th>Barcode</th> - <th>Home library</th> - <th>Last location</th> - <th>Call no.</th> - <th>Copy number</th> - [% IF itemdata_enumchron %] - <th>Vol no.</th> - [% END %] - <th>Information</th> - </tr> + <th>Hold</th> + [% IF ( item_level_itypes ) %] + <th>Item type</th> + [% END %] + <th>Barcode</th> + <th>Home library</th> + <th>Last location</th> + <th>Call no.</th> + <th>Copy number</th> + [% IF itemdata_enumchron %] + <th>Vol no.</th> + [% END %] + <th>Information</th> + </tr> + </thead> [% FOREACH itemloo IN bibitemloo.itemloop %] [% UNLESS ( itemloo.hide ) %] <tr class="[% itemloo.backgroundcolor %]"> -- 1.7.10.4