Merge branch 'bug_9818' into 3.14-master
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / systempreferences.tt
index d9d0a5c..7712551 100644 (file)
@@ -2,6 +2,24 @@
 <title>Koha &rsaquo; Administration &rsaquo; [% IF ( add_form ) %] System preferences &rsaquo; [% IF ( modify ) %]Modify system preference '[% searchfield %]'[% ELSE %]Add a system preference[% END %][% END %][% IF ( add_validate ) %] System preferences &rsaquo; Data added[% END %]
 [% IF ( delete_confirm ) %] System preferences &rsaquo; [% searchfield %] &rsaquo; Confirm deletion of parameter '[% searchfield %]'[% END %][% IF ( delete_confirmed ) %] System preferences &rsaquo; Parameter deleted[% END %][% IF ( else ) %]System preferences[% END %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
+[% IF ( 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>
+<script type="text/javascript">
+    //<![CDATA[
+     $(document).ready(function() {
+        [% IF ( loop ) %]$("#sysprefst").dataTable($.extend(true, {}, dataTablesDefaults, {
+            "sDom": 't',
+            "aoColumnDefs": [
+                { "aTargets": [ -1, -2, -3, -4 ], "bSortable": false, "bSearchable": false }
+            ],
+            "bPaginate": false
+        }));[% END %]
+     });
+</script>
+[% END %]
 <script type="text/javascript">
 //<![CDATA[
 [% IF ( add_form ) %]
                 return false;
             } ).nextAll( 'textarea, input[type=submit]' ).hide();
         } );
+
         //]]>
 </script>
 </head>
 <body id="admin_systempreferences" class="admin">
 [% INCLUDE 'header.inc' %]
-[% INCLUDE 'sysprefs-admin-search.inc' %]
+[% INCLUDE 'prefs-admin-search.inc' %]
 
 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; [% IF ( add_form ) %] <a href="/cgi-bin/koha/admin/systempreferences.pl">System preferences</a> &rsaquo; [% IF ( modify ) %]Modify system preference '[% searchfield %]'[% ELSE %]Add a system preference[% END %][% END %][% IF ( add_validate ) %] <a href="/cgi-bin/koha/admin/systempreferences.pl">System preferences</a> &rsaquo; Data added[% END %]
 [% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a> &rsaquo; <a href="/cgi-bin/koha/admin/systempreferences.pl?op=add_form&amp;searchfield=[% searchfield %]">[% searchfield %]</a> &rsaquo; Confirm deletion of parameter '[% searchfield %]'[% END %][% IF ( delete_confirmed ) %] <a href="/cgi-bin/koha/admin/systempreferences.pl">System preferences</a> &rsaquo; Parameter deleted[% END %][% IF ( else ) %]System preferences[% END %]</div>
     [% END %]
    
     [% IF ( else ) %]
-    
-    <div id="toolbar">
-    <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
-    <script type="text/javascript">
-    //<![CDATA[
-    // prepare DOM for YUI Toolbar
-     $(document).ready(function() {
-        yuiToolbar();
-        [% IF ( loop ) %]$("#sysprefst").tablesorter({
-            sortList: [[0,0]],
-            headers: { 1: {sorter:false},2: { sorter: false },3: { sorter: false },4: { sorter: false }}
-        });[% END %]
-     });
-    // YUI Toolbar Functions
-    function yuiToolbar() {
-        new YAHOO.widget.Button("newstopword");
-    }   //]]>
-    </script>
-    <ul class="toolbar">
-        <li><a id="newstopword" href="[% script_name %]?op=add_form">New preference</a></li>
-    </ul></div>
-    
-    <h1>System preferences admin</h1>
-    <h2>[% tab %] preferences</h2>
-    [% searchfield %]
-    <table width="80%" id="sysprefst">
-    <thead><tr>
+
+    <div id="toolbar" class="btn-toolbar">
+        <a class="btn btn-small" id="newstopword" href="[% script_name %]?op=add_form"><i class="icon-plus"></i> New preference</a>
+    </div>
+
+    [% IF ( tab != 'local_use' ) %]
+        <p>Please click on one of the tabs at the left side of this form.</p>
+        <table>
+    [% ELSE %]
+        <h1>Local use preferences</h1>
+        <table width="80%" id="sysprefst">
+        <thead><tr>
         <th>Preference</th>
         <th>Explanation</th>
         <th>Value</th>
         <th>Edit</th>
         <th>Delete</th>
-    </tr></thead>
+        </tr></thead>
+    [% END %]
     <tbody>[% FOREACH loo IN loop %]
     [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]