Merge branch 'bug_9818' into 3.14-master
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / cities.tt
index 2e9bdd2..acb4f22 100644 (file)
@@ -1,14 +1,10 @@
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Administration &rsaquo; [% IF ( add_form ) %]Cities &rsaquo; [% IF ( cityid ) %] Modify City[% ELSE %] New City[% END %][% ELSE %][% IF ( delete_confirm ) %]Cities &rsaquo; Confirm Deletion of City[% ELSE %] Cities[% END %][% END %]</title>
+<title>Koha &rsaquo; Administration &rsaquo; [% IF ( add_form ) %]Cities &rsaquo; [% IF ( cityid ) %] Modify city[% ELSE %] New city[% END %][% ELSE %][% IF ( delete_confirm ) %]Cities &rsaquo; Confirm deletion of city[% ELSE %] Cities[% END %][% 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_cities").tablesorter({
-               sortList: [[1,0]],
-               headers: { 3: { sorter: false},4: { sorter: false}}
-       }).tablesorterPager({container: $("#pagertable_cities"),positionFixed: false,size: 20});
-}); </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>
 <script type="text/javascript">
 //<![CDATA[
     function Check(f) {
         }
     }
     $(document).ready(function() {
-        new YAHOO.widget.Button("newcity");
+        $("#table_cities").dataTable($.extend(true, {}, dataTablesDefaults, {
+            "aoColumnDefs": [
+                { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
+            ],
+            "aaSorting": [[ 1, "asc" ]],
+            "iDisplayLength": 10,
+            "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
+        }));
     });
 //]]>
 </script>
 </head>
-<body>
+<body id="admin_cities" class="admin">
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'cities-admin-search.inc' %]
 
@@ -35,7 +38,7 @@
     [% IF ( add_form ) %]
     &rsaquo; [% IF ( cityid ) %]Modify[% ELSE %]New[% END %] City
     [% ELSIF ( delete_confirm ) %]
-    &rsaquo; Confirm Deletion of City
+    &rsaquo; Confirm deletion of city
     [% END %]
 </div>
 
                <span class="label">City ID: </span>[% cityid %]</li>
        [% END %]
        <li>
-       <label for="city_name">City, State: </label>
+       <label for="city_name" class="required" title="required">City: </label>
        <input type="text" name="city_name" id="city_name" size="80" maxlength="100" value="[% city_name |html %]" />
        </li>
+       <li>
+       <label for="city_state">State: </label>
+       <input type="text" name="city_state" id="city_state" size="80" maxlength="100" value="[% city_state |html %]" />
+       </li>
        <li>                            
-       <label for="city_zipcode">Zip/Postal code: </label>
+       <label for="city_zipcode" class="required" title="required">Zip/Postal code: </label>
        <input type="text" name="city_zipcode" id="city_zipcode" size="20" maxlength="20" value="[% city_zipcode %]" />
+       </li>
+       <li>
+       <label for="city_country">Country: </label>
+       <input type="text" name="city_country" id="city_country" size="80" maxlength="100" value="[% city_country |html %]" />
        </li></ol></fieldset>
        
        <fieldset class="action">
         <tr><th>City id</th>
             <td>[% cityid %]</td>
         </tr>
-        <tr><th>City, State</th>
+        <tr><th>City</th>
             <td>[% city_name %]</td>
         </tr>
+        <tr><th>State</th>
+            <td>[% city_state %]</td>
+        </tr>
         <tr><th>Zip/Postal code</th>
             <td>[% city_zipcode %]</td>
         </tr>
+        <tr><th>Country</th>
+            <td>[% city_country %]</td>
+        </tr>
     </table>
     <form action="[% script_name %]" method="post">
         <input type="hidden" name="op" value="delete_confirmed" />
 
 [% IF ( else ) %]
 
-<div id="toolbar">
-       <ul class="toolbar">
-       <li><a id="newcity" href="[% script_name %]?op=add_form">New City</a></li>
-</ul></div>
+<div id="toolbar" class="btn-toolbar">
+    <a class="btn btn-small" id="newcity" href="[% script_name %]?op=add_form"><i class="icon-plus"></i> New city</a>
+</div>
 
        <h2>Cities</h2>
        [% IF ( searchfield ) %]
        [% END %]
 
 [% IF ( loop ) %]
-<span id="pagertable_cities" class="pager">
-       <form class="formpager">&nbsp;<strong>page(s)</strong>&nbsp;:
-               <img src="[% interface %]/prog/img/first.png" class="first"/>
-               <img src="[% interface %]/prog/img/prev.png" class="prev"/>
-               <input type="text" size="5" class="pagedisplay"/>
-               <img src="[% interface %]/prog/img/next.png" class="next"/>
-               <img src="[% interface %]/prog/img/last.png" class="last"/>
-               , entries/page : 
-               <select class="pagesize">
-               <option value="10">10</option>
-                       <option selected="selected" value="20">20</option>
-                       <option value="30">30</option>
-                       <option value="40">40</option>
-                       <option value="50">50</option>
-                       <option value="100">100</option>
-               </select>
-       </form>
-</span>
 <table id="table_cities">
                <thead>
                        <th>City ID</th>
-                       <th>City, State</th>
+                       <th>City</th>
+                       <th>State</th>
                        <th>Zip/Postal code</th>
+                       <th>Country</th>
                        <th>&nbsp;</th>
                        <th>&nbsp;</th>
                </thead>
                [% END %]
                        <td>[% loo.cityid %]</td>
                        <td>[% loo.city_name %]</td>
+                       <td>[% loo.city_state %]</td>
                        <td>[% loo.city_zipcode %]</td>
-                       
+                       <td>[% loo.city_country %]</td>
                        <td><a href="[% loo.script_name %]?op=add_form&amp;cityid=[% loo.cityid %]">Edit</a></td>
                        <td><a href="[% loo.script_name %]?op=delete_confirm&amp;cityid=[% loo.cityid %]">Delete</a></td>
                </tr>