[Koha-patches] [PATCH] Bug 11721 - Use new DataTables include in suggestions template

Owen Leonard oleonard at myacpl.org
Fri Feb 7 22:04:56 CET 2014


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

Sorting is now configured to exclude articles when sorting the title
column.

To test, apply the patch and view the suggestions page (Acquisitions ->
Suggestions). Sorting of suggestions should work correctly.
---
 .../prog/en/modules/suggestion/suggestion.tt       |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
index cd5b958..2f1cfb0 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt
@@ -29,9 +29,7 @@
 [% END %]
 [% IF ( op_else ) %]
 <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" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
 <script type="text/javascript">
 // <![CDATA[
@@ -58,6 +56,9 @@ $(document).ready(function() {
         "aoColumnDefs": [
             { "aTargets": [ 0, -1, -2 ], "bSortable": false, "bSearchable": false },
         ],
+        "aoColumns": [
+            null,{ "sType": "anti-the" },null,null,null,null,null
+        ],
         "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
         "iDisplayLength": 20,
         "sPaginationType": "four_button"
-- 
1.7.9.5


More information about the Koha-patches mailing list