Bug 8015: Add MARC Modifications Templates
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / marctagstructure.tt
index d0f0132..c905f30 100644 (file)
@@ -5,14 +5,9 @@
 [% IF ( delete_confirmed ) %]MARC frameworks ›  Data deleted[% END %]
 [% IF ( else ) %]MARC frameworks[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.pager.js"></script>
-<script type="text/javascript" id="js">$(document).ready(function() {
-       $("#table_marctagstructure").tablesorter({
-               sortList: [[0,0]],
-               headers: { 5: { sorter: false},6: { sorter: false},7: { sorter: false}}
-       }).tablesorterPager({container: $("#pagertable_marctagstructure"),positionFixed: false,size: 20});
-}); </script>
+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
+[% INCLUDE 'datatables.inc' %]
+
 <script type="text/javascript">
 //<![CDATA[
 function Check(f) {
@@ -32,8 +27,16 @@ function Check(f) {
 }
 
 $(document).ready(function() {
-    new YAHOO.widget.Button("addtag");
+    $("#table_marctagstructure").dataTable($.extend(true, {}, dataTablesDefaults, {
+        "aoColumnDefs": [
+            { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
+        ],
+        "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
+        "iDisplayLength": 20,
+        "sPaginationType": "four_button"
+    }));
 });
+
 //]]>
 </script>
 </head>
@@ -65,10 +68,9 @@ $(document).ready(function() {
       <div class="yui-b">
 
 [% IF ( else ) %]
-<div id="toolbar">
-       <ul class="toolbar">
-    <li><a id="addtag" href="/cgi-bin/koha/admin/marctagstructure.pl?op=add_form&amp;frameworkcode=[% frameworkcode %]">New tag</a></li>
-</ul></div>[% END %]
+<div id="toolbar" class="btn-toolbar">
+    <a class="btn btn-small" id="addtag" href="/cgi-bin/koha/admin/marctagstructure.pl?op=add_form&amp;frameworkcode=[% frameworkcode %]"><i class="icon-plus"></i> New tag</a>
+</div>[% END %]
 
 <h1>MARC Framework for [% IF ( frameworkcode ) %][% frameworktext %] ([% frameworkcode %])[% ELSE %]default MARC framework[% END %]</h1>
 
@@ -157,11 +159,10 @@ $(document).ready(function() {
         [% END %]</p>
 </fieldset>
 </form>
-<div id="pagertable_marctagstructure">
-[% INCLUDE 'table-pager.inc' perpage='20' %]
-</div>
+
     <table id="table_marctagstructure">
     <thead>
+        <tr>
         <th>Tag</th>
         <th>Lib</th>
         <th>Repeatable</th>
@@ -170,8 +171,9 @@ $(document).ready(function() {
         <th>Subfields</th>
         <th>Edit</th>
         <th>Delete</th>
+        </tr>
        </thead>
-
+    <tbody>
     [% IF ( select_display ) %]
         [% FOREACH loo IN loop %]
             [% IF ( loop.odd ) %]<tr>[% ELSE %]<tr class="highlight">[% END %]
@@ -209,6 +211,7 @@ $(document).ready(function() {
     </tr>
     [% END %]
     [% END %]
+    </tbody>
     </table>