Bug 11605: fallback to default DataTables settings where possible
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / cities.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <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>
3 [% INCLUDE 'doc-head-close.inc' %]
4 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5 [% INCLUDE 'datatables.inc' %]
6 <script type="text/javascript">
7 //<![CDATA[
8     $(document).ready(function() {
9         $("#table_cities").dataTable($.extend(true, {}, dataTablesDefaults, {
10             "aoColumnDefs": [
11                 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
12             ],
13             "aaSorting": [[ 1, "asc" ]],
14             "iDisplayLength": 10
15         }));
16     });
17 //]]>
18 </script>
19 </head>
20 <body id="admin_cities" class="admin">
21 [% INCLUDE 'header.inc' %]
22 [% INCLUDE 'cities-admin-search.inc' %]
23
24 <div id="breadcrumbs">
25     <a href="/cgi-bin/koha/mainpage.pl">Home</a>
26     &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
27     &rsaquo; <a href="/cgi-bin/koha/admin/cities.pl">Cities</a>
28     [% IF ( add_form ) %]
29     &rsaquo; [% IF ( cityid ) %]Modify[% ELSE %]New[% END %] City
30     [% ELSIF ( delete_confirm ) %]
31     &rsaquo; Confirm deletion of city
32     [% END %]
33 </div>
34
35 <div id="doc3" class="yui-t2">
36    
37    <div id="bd">
38         <div id="yui-main">
39         <div class="yui-b">
40
41 [% IF ( add_form ) %]
42         [% IF ( cityid ) %]
43                 <h1>Modify a city</h1>
44         [% ELSE %]
45                 <h1>New city</h1>
46         [% END %]
47
48     <form action="[% script_name %]" name="Aform" method="post" class="validated">
49         <input type="hidden" name="op" value="add_validate" />
50         <input type="hidden" name="checked" value="0" />
51         <input type="hidden" name="cityid" value="[% cityid %]" />
52
53 <fieldset class="rows"><ol>     [% IF ( cityid ) %]
54                 <li>
55                 <span class="label">City ID: </span>[% cityid %]</li>
56         [% END %]
57         <li>
58     <label for="city_name" class="required">City: </label>
59     <input type="text" name="city_name" id="city_name" size="80" maxlength="100" value="[% city_name |html %]" required="required" class="required" /> <span class="required">Required</span>
60         </li>
61         <li>
62         <label for="city_state">State: </label>
63         <input type="text" name="city_state" id="city_state" size="80" maxlength="100" value="[% city_state |html %]" />
64         </li>
65         <li>                            
66     <label for="city_zipcode" class="required">Zip/Postal code: </label>
67     <input type="text" name="city_zipcode" id="city_zipcode" size="20" maxlength="20" value="[% city_zipcode %]" required="required" class="required" /> <span class="required">Required</span>
68         </li>
69         <li>
70         <label for="city_country">Country: </label>
71         <input type="text" name="city_country" id="city_country" size="80" maxlength="100" value="[% city_country |html %]" />
72         </li></ol></fieldset>
73         
74         <fieldset class="action">
75         <input type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/admin/cities.pl">Cancel</a>
76         </fieldset>
77         </form>
78
79 [% END %]
80 [% IF ( delete_confirm ) %]
81     <div class="dialog alert">
82     <h3>Delete City "[% city_name %]?"</h3>
83     <table>
84         <tr><th>City id</th>
85             <td>[% cityid %]</td>
86         </tr>
87         <tr><th>City</th>
88             <td>[% city_name %]</td>
89         </tr>
90         <tr><th>State</th>
91             <td>[% city_state %]</td>
92         </tr>
93         <tr><th>Zip/Postal code</th>
94             <td>[% city_zipcode %]</td>
95         </tr>
96         <tr><th>Country</th>
97             <td>[% city_country %]</td>
98         </tr>
99     </table>
100     <form action="[% script_name %]" method="post">
101         <input type="hidden" name="op" value="delete_confirmed" />
102         <input type="hidden" name="cityid" value="[% cityid %]" />
103         <input type="submit" class="approve" value="Yes, Delete" />
104     </form>
105     <form action="[% script_name %]" method="get">
106         <input type="submit" class="deny" value="No, do not Delete" />
107     </form>
108 </div>
109 [% END %]
110
111 [% IF ( else ) %]
112
113 <div id="toolbar" class="btn-toolbar">
114     <a class="btn btn-small" id="newcity" href="[% script_name %]?op=add_form"><i class="icon-plus"></i> New city</a>
115 </div>
116
117         <h2>Cities</h2>
118         [% IF ( searchfield ) %]
119                 Searching: [% searchfield %]
120         [% END %]
121
122 [% IF ( loop ) %]
123 <table id="table_cities">
124                 <thead>
125                         <th>City ID</th>
126                         <th>City</th>
127                         <th>State</th>
128                         <th>Zip/Postal code</th>
129                         <th>Country</th>
130                         <th>&nbsp;</th>
131                         <th>&nbsp;</th>
132                 </thead>
133                 [% FOREACH loo IN loop %]
134                 [% UNLESS ( loop.odd ) %]
135                 <tr class="highlight">
136                 [% ELSE %]
137                 <tr>
138                 [% END %]
139                         <td>[% loo.cityid %]</td>
140                         <td>[% loo.city_name %]</td>
141                         <td>[% loo.city_state %]</td>
142                         <td>[% loo.city_zipcode %]</td>
143                         <td>[% loo.city_country %]</td>
144                         <td><a href="[% loo.script_name %]?op=add_form&amp;cityid=[% loo.cityid %]">Edit</a></td>
145                         <td><a href="[% loo.script_name %]?op=delete_confirm&amp;cityid=[% loo.cityid %]">Delete</a></td>
146                 </tr>
147                 [% END %]
148         </table>[% END %]
149 [% END %]
150
151 </div>
152 </div>
153 <div class="yui-b">
154 [% INCLUDE 'admin-menu.inc' %]
155 </div>
156 </div>
157 [% INCLUDE 'intranet-bottom.inc' %]
158