3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Administration › [% IF op =='add_form' %]Cities › [% IF city.cityid %] Modify city[% ELSE %] New city[% END %][% ELSE %][% IF op == 'delete_confirm' %]Cities › Confirm deletion of city[% ELSE %] Cities[% END %][% END %]</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% Asset.css("css/datatables.css") %]
9 <body id="admin_cities" class="admin">
10 [% INCLUDE 'header.inc' %]
11 [% INCLUDE 'cities-admin-search.inc' %]
13 <div id="breadcrumbs">
14 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
15 › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
16 › <a href="/cgi-bin/koha/admin/cities.pl">Cities</a>
17 [% IF op == 'add_form' %]
18 › [% IF city.cityid %]Modify[% ELSE %]New[% END %] City
19 [% ELSIF op == 'delete_confirm' %]
20 › Confirm deletion of city
24 <div id="doc3" class="yui-t2">
30 [% FOR m IN messages %]
31 <div class="dialog [% m.type %]">
33 [% CASE 'error_on_update' %]
34 An error occurred when updating this city. Perhaps it already exists.
35 [% CASE 'error_on_insert' %]
36 An error occurred when adding this city. The city id might already exist.
37 [% CASE 'error_on_delete' %]
38 An error occurred when deleting this city. Check the logs.
39 [% CASE 'success_on_update' %]
40 City updated successfully.
41 [% CASE 'success_on_insert' %]
42 City added successfully.
43 [% CASE 'success_on_delete' %]
44 City deleted successfully.
45 [% CASE 'already_exists' %]
46 This city already exists.
53 [% IF op == 'add_form' %]
55 <h1>Modify a city</h1>
60 <form action="/cgi-bin/koha/admin/cities.pl" name="Aform" method="post" class="validated">
61 <input type="hidden" name="op" value="add_validate" />
62 <input type="hidden" name="cityid" value="[% city.cityid %]" />
64 <fieldset class="rows">
67 <li><span class="label">City ID: </span>[% city.cityid %]</li>
70 <label for="city_name" class="required">City: </label>
71 <input type="text" name="city_name" id="city_name" size="80" maxlength="100" value="[% city.city_name |html %]" required="required" class="required" /> <span class="required">Required</span>
74 <label for="city_state">State: </label>
75 <input type="text" name="city_state" id="city_state" size="80" maxlength="100" value="[% city.city_state |html %]" />
78 <label for="city_zipcode" class="required">ZIP/Postal code: </label>
79 <input type="text" name="city_zipcode" id="city_zipcode" size="20" maxlength="20" value="[% city.city_zipcode %]" required="required" class="required" /> <span class="required">Required</span>
82 <label for="city_country">Country: </label>
83 <input type="text" name="city_country" id="city_country" size="80" maxlength="100" value="[% city.city_country |html %]" />
88 <fieldset class="action">
89 <input type="submit" value="Submit" />
90 <a class="cancel" href="/cgi-bin/koha/admin/cities.pl">Cancel</a>
95 [% IF op == 'delete_confirm' %]
96 <div class="dialog alert">
97 <h3>Delete city "[% city.city_name %]?"</h3>
100 <td>[% city.cityid %]</td>
103 <td>[% city.city_name %]</td>
106 <td>[% city.city_state %]</td>
108 <tr><th>ZIP/Postal code</th>
109 <td>[% city.city_zipcode %]</td>
112 <td>[% city.city_country %]</td>
115 <form action="/cgi-bin/koha/admin/cities.pl" method="post">
116 <input type="hidden" name="op" value="delete_confirmed" />
117 <input type="hidden" name="cityid" value="[% city.cityid %]" />
118 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
120 <form action="/cgi-bin/koha/admin/cities.pl" method="get">
121 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
126 [% IF op == 'list' %]
128 <div id="toolbar" class="btn-toolbar">
129 <a class="btn btn-default btn-sm" id="newcity" href="/cgi-bin/koha/admin/cities.pl?op=add_form"><i class="fa fa-plus"></i> New city</a>
134 Searching: [% searchfield |html %]
137 [% IF cities.count %]
138 <table id="table_cities">
143 <th>ZIP/Postal code</th>
148 [% FOREACH city IN cities %]
150 <td>[% city.cityid %]</td>
151 <td>[% city.city_name %]</td>
152 <td>[% city.city_state %]</td>
153 <td>[% city.city_zipcode %]</td>
154 <td>[% city.city_country %]</td>
156 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/cities.pl?op=add_form&cityid=[% city.cityid %]"><i class="fa fa-pencil"></i> Edit</a>
157 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/cities.pl?op=delete_confirm&cityid=[% city.cityid %]"><i class="fa fa-trash"></i> Delete</a>
164 <div class="dialog message">
165 There are no cities defined. <a href="/cgi-bin/koha/admin/cities.pl?op=add_form">Create a new city</a>.
173 [% INCLUDE 'admin-menu.inc' %]
177 [% MACRO jsinclude BLOCK %]
178 [% Asset.js("js/admin-menu.js") %]
179 [% INCLUDE 'datatables.inc' %]
180 <script type="text/javascript">
181 $(document).ready(function() {
182 $("#table_cities").dataTable($.extend(true, {}, dataTablesDefaults, {
184 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
186 "aaSorting": [[ 1, "asc" ]],
187 "iDisplayLength": 10,
188 "sPaginationType": "full_numbers"
193 [% INCLUDE 'intranet-bottom.inc' %]