[Koha-patches] [PATCH] Bug 11716 - Use new DataTables include in label manage template

Owen Leonard oleonard at myacpl.org
Fri Feb 7 21:06:39 CET 2014


This patch modifies the template for the label manage pages to use
the new DataTables include. This simplifies the inclusion of assets and
updates to the latest DataTables version.

To test, view the following pages and confirm that table sorting is
working correctly:

Manage layouts (/cgi-bin/koha/labels/label-manage.pl?label_element=layout)
Manage templates (/cgi-bin/koha/labels/label-manage.pl?label_element=template)
Manage profiles (/cgi-bin/koha/labels/label-manage.pl?label_element=profile)
Manage batches (/cgi-bin/koha/labels/label-manage.pl?label_element=batch)
---
 .../prog/en/modules/labels/label-manage.tt         |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt
index edc469a..791bac0 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt
@@ -80,14 +80,15 @@
     </script>
 
 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
-<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>
+[% INCLUDE 'datatables.inc' %]
 <script type="text/javascript" id="js">
  $(document).ready(function() {
     $("#labels-table").dataTable($.extend(true, {}, dataTablesDefaults, {
         "sPaginationType": "four_button",
         "aaSorting": [[ 1, "asc" ]],
+        "aoColumnDefs": [
+            { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
+        ]
     }));
  });
 </script>
-- 
1.7.9.5


More information about the Koha-patches mailing list