Bug 5345: DataTables integration in acquisition module [10]
authorJonathan Druart <jonathan.druart@biblibre.com>
Fri, 17 Feb 2012 14:58:20 +0000 (15:58 +0100)
committerPaul Poulain <paul.poulain@biblibre.com>
Mon, 14 May 2012 13:41:58 +0000 (15:41 +0200)
ordered.tt

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt

index 5a2af78..fbfa57a 100644 (file)
@@ -1,7 +1,20 @@
 [% USE KohaDates %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; Ordered</title>
+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
 [% INCLUDE 'doc-head-close.inc' %]
+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
+[% INCLUDE 'datatables-strings.inc' %]
+<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
+<script type="text/javascript">
+//<![CDATA[
+ $(document).ready(function() {
+    var spent = $("#spent").dataTable($.extend(true, {}, dataTablesDefaults, {
+        "sPaginationType": "four_button"
+    } ) );
+ });
+ //]]>
+</script>
 </head>
 <body id="acq_ordered" class="acq">
 [% INCLUDE 'header.inc' %]
@@ -31,7 +44,7 @@
        <th> Subtotal </th>
     </tr>
     </thead>
-
+    <tbody>
 [% FOREACH order IN ordered %]
     [% IF loop.odd %]
         <tr class="highlight">
@@ -68,7 +81,7 @@
        </td>
     </tr>
 [% END %]
-
+    </tbody>
     <tfoot>
     <tr>
         <td> Total </td>