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