Bug 10515: make behavior of library category fetchers consistent with other fetchers
[koha_fer] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / z3950servers.tt
index 9a4950b..18f92fc 100644 (file)
@@ -1,11 +1,16 @@
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Administration &rsaquo; [% IF ( else ) %]Z39.50 Servers[% END %]
-[% IF ( add_form ) %] Z39.50 Servers &rsaquo; [% IF ( searchfield ) %]Modify Z39.50 Server [% searchfield %][% ELSE %]New Z39.50 Server[% END %][% END %]
-[% IF ( delete_confirm ) %]Z39.50 Servers &rsaquo; Confirm Deletion[% END %]
-[% IF ( add_validate ) %]Z39.50 Servers &rsaquo; Z39.50 Server Added[% END %]
-[% IF ( delete_confirmed ) %]Z39.50 Servers &rsaquo; Z39.50 Server Deleted[% END %]</title>
+<title>Koha &rsaquo; Administration &rsaquo; [% IF ( else ) %]Z39.50 servers[% END %]
+[% IF ( add_form ) %] Z39.50 servers &rsaquo; [% IF ( searchfield ) %]Modify Z39.50 server [% searchfield %][% ELSE %]New Z39.50 server[% END %][% END %]
+[% IF ( delete_confirm ) %]Z39.50 servers &rsaquo; Confirm deletion[% END %]
+[% IF ( add_validate ) %]Z39.50 servers &rsaquo; Z39.50 server added[% END %]
+[% IF ( delete_confirmed ) %]Z39.50 servers &rsaquo; Z39.50 server deleted[% 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>
+[% END %]
 [% IF ( add_form ) %]
 <script type="text/javascript">
 //<![CDATA[
         }
         //]]>
 </script>
-        [% END %]
+[% END %]
+[% IF ( else ) %]
+    <script type="text/javascript">
+    //<![CDATA[
+     $(document).ready(function() {
+        [% IF ( loop ) %]$("#serverst").dataTable($.extend(true, {}, dataTablesDefaults, {
+            "aoColumnDefs": [
+                { "aTargets": [ 2,3,4,7,8,9,10,11 ], "bSortable": false, "bSearchable": false },
+            ],
+            "iDisplayLength": 20,
+            "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
+            "sPaginationType": "four_button"
+        }));[% END %]
+     });
+    //]]>
+    </script>
+[% END %]
+
 </head>
 <body id="admin_z3950servers" class="admin">
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'z3950-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 ( else ) %]Z39.50 Servers[% END %]
-[% IF ( add_form ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 Servers</a> &rsaquo; [% IF ( searchfield ) %]Modify Z39.50 Server [% searchfield %][% ELSE %]New Z39.50 Server[% END %][% END %]
-[% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 Servers</a> &rsaquo; Confirm Deletion[% END %]
-[% IF ( add_validate ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 Servers</a> &rsaquo; Z39.50 Server Added[% END %]
-[% IF ( delete_confirmed ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 Servers</a> &rsaquo; Z39.50 Server Deleted[% END %]</div>
+<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 ( else ) %]Z39.50 servers[% END %]
+[% IF ( add_form ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; [% IF ( searchfield ) %]Modify Z39.50 server [% searchfield %][% ELSE %]New Z39.50 server[% END %][% END %]
+[% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; Confirm deletion[% END %]
+[% IF ( add_validate ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; Z39.50 server added[% END %]
+[% IF ( delete_confirmed ) %] <a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 servers</a> &rsaquo; Z39.50 server deleted[% END %]</div>
 
 <div id="doc3" class="yui-t2">
    
         <form action="[% script_name %]" name="Aform" method="post">
         <input type="hidden" name="op" value="add_validate" />
 [% IF ( searchfield ) %]
-                <h1>Modify Z39.50 Server</h1>
+                <h1>Modify Z39.50 server</h1>
         [% ELSE %]
-                <h1>New Z39.50 Server</h1>
+                <h1>New Z39.50 server</h1>
         [% END %]                
         <fieldset class="rows">
         <ol>[% IF ( searchfield ) %]
-                <li><span class="label">Z39.50 Server: </span>        <input type="hidden" name="searchfield" value="[% searchfield %]" />[% searchfield %]</li>
+                <li><span class="label">Z39.50 server: </span>        <input type="hidden" name="searchfield" value="[% searchfield %]" />[% searchfield %]</li>
         [% ELSE %]
-                <li><label for="searchfield">Z39.50 Server: </label>        <input type="text" name="searchfield" id="searchfield" size="65" maxlength="100" onblur="toUC(this)" /></li>
+                <li><label for="searchfield">Z39.50 server: </label>        <input type="text" name="searchfield" id="searchfield" size="65" maxlength="100" onblur="toUC(this)" /></li>
         [% END %]
 
                <li><label for="host">Hostname: </label>        <input type="text" name="host" id="host" size="30" value="[% host %]" />
 
     <li><label for="encoding">Encoding (z3950 can send<br /> records in various encodings. Choose one): </label>  
 <select name="encoding">
-[% IF ( encodingutf8 ) %]
-<option value="utf8" selected="selected">UTF-8</option>
-[% ELSE %]
-<option value="utf8">UTF-8</option>
-[% END %]
-[% IF ( encodingEUC_KR ) %]
-<option value="EUC-KR" selected="selected">EUC-KR</option>
-[% ELSE %]
-<option value="EUC-KR">EUC-KR</option>
-[% END %]
-[% IF ( encodingISO_5426 ) %]
-<option value="ISO_5426" selected="selected">ISO_5426</option>
-[% ELSE %]
-<option value="ISO_5426">ISO_5426</option>
-[% END %]
-[% IF ( encodingISO_6937 ) %]
-<option value="ISO_6937" selected="selected">ISO_6937</option>
-[% ELSE %]
-<option value="ISO_6937">ISO_6937</option>
-[% END %]
-[% IF ( encodingMARC_8 ) %]
-<option value="MARC-8" selected="selected">MARC-8</option>
-[% ELSE %]
-<option value="MARC-8">MARC-8</option>
+[% FOREACH enc IN [ 'utf8' 'EUC-KR' 'ISO_5426' 'ISO_6937' 'ISO_8859-1' 'MARC-8' ] %]
+    [% IF ( encoding == enc ) %]
+    <option value="[% enc %]" selected="selected">[% enc %]</option>
+    [% ELSE %]
+    <option value="[% enc %]">[% enc %]</option>
+    [% END %]
 [% END %]
 </select>
 </li>
 [% END %]
 
 [% IF ( add_validate ) %]
-<h3>Z39.50 Server Added</h3>
+<h3>Z39.50 server added</h3>
 <form action="[% script_name %]" method="post">
         <input type="submit" value="OK" />
         </form>
 
 [% IF ( delete_confirm ) %]
        [% reqsel %]
-<h3>Confirm Deletion of Server [% searchfield %]</h3>  
+<h3>Confirm deletion of server [% searchfield %]</h3>
         <ul>
                 <li><strong>Target: </strong>        [% searchfield %]</li>
                 <li><strong>Hostname: </strong>[% host %]</li>
 [% END %]
 
 [% IF ( delete_confirmed ) %]
-<h3>Z39.50 Server Deleted</h3>
+<h3>Z39.50 server deleted</h3>
 <form action="[% script_name %]" method="post">
                 <input type="submit" value="OK" />
 </form>
 
 [% 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 ) %]$.tablesorter.defaults.widgets = ['zebra'];
-               $("#serverst").tablesorter({
-                       sortList: [[0,0]],
-                       headers: { 2: {sorter:false},3: { sorter: false },4: { sorter: false },7: { sorter: false },8: { sorter: false },9: { sorter: false },10: { sorter: false }}
-               });[% END %]
-        });
-       // YUI Toolbar Functions
-       function yuiToolbar() {
-           new YAHOO.widget.Button("newserver");
-       }       //]]>
-       </script>
-       <ul class="toolbar">
-       <li><a id="newserver" href="/cgi-bin/koha/admin/z3950servers.pl?op=add_form">New Z39.50 Server</a></li>
-</ul></div>
+<div id="toolbar" class="btn-toolbar">
+    <a id="newserver" class="btn btn-small" href="/cgi-bin/koha/admin/z3950servers.pl?op=add_form"><i class="icon-plus"></i> New Z39.50 server</a>
+</div>
 
-<h3>Z39.50 Servers Administration</h3>
+<h3>Z39.50 servers administration</h3>
 
         [% IF ( searchfield ) %]
                 You searched for [% searchfield %]
         [% END %]              
 <table id="serverst">
-                <thead><tr><th>Target</th><th>Hostname/Port</th><th>Database</th><th>Userid</th><th>Password</th><th>Checked</th><th>Rank</th>                         <th>Syntax</th><th>Encoding</th><th>Timeout</th><th colspan="2">&nbsp;</th>
+                <thead><tr><th>Target</th><th>Hostname/Port</th><th>Database</th><th>Userid</th><th>Password</th><th>Checked</th><th>Rank</th><th>Syntax</th><th>Encoding</th><th>Timeout</th><th>&nbsp;</th><th>&nbsp;</th>
                 </tr></thead>
                 <tbody>[% FOREACH loo IN loop %]
                 [% UNLESS ( loop.odd ) %]