2 [% INCLUDE 'doc-head-open.inc' %]
3 <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>
4 [% INCLUDE 'doc-head-close.inc' %]
5 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
8 <body id="admin_cities" class="admin">
9 [% INCLUDE 'header.inc' %]
10 [% INCLUDE 'cities-admin-search.inc' %]
12 <div id="breadcrumbs">
13 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
14 › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
15 › <a href="/cgi-bin/koha/admin/cities.pl">Cities</a>
16 [% IF op == 'add_form' %]
17 › [% IF city.cityid %]Modify[% ELSE %]New[% END %] City
18 [% ELSIF op == 'delete_confirm' %]
19 › Confirm deletion of city
23 <div id="doc3" class="yui-t2">
29 [% FOR m IN messages %]
30 <div class="dialog [% m.type %]">
32 [% CASE 'error_on_update' %]
33 An error occurred when updating this city. Perhaps it already exists.
34 [% CASE 'error_on_insert' %]
35 An error occurred when adding this city. The city id might already exist.
36 [% CASE 'error_on_delete' %]
37 An error occurred when deleting this city. Check the logs.
38 [% CASE 'success_on_update' %]
39 City updated successfully.
40 [% CASE 'success_on_insert' %]
41 City added successfully.
42 [% CASE 'success_on_delete' %]
43 City deleted successfully.
44 [% CASE 'already_exists' %]
45 This city already exists.
52 [% IF op == 'add_form' %]
54 <h1>Modify a city</h1>
59 <form action="/cgi-bin/koha/admin/cities.pl" name="Aform" method="post" class="validated">
60 <input type="hidden" name="op" value="add_validate" />
61 <input type="hidden" name="cityid" value="[% city.cityid %]" />
63 <fieldset class="rows">
66 <li><span class="label">City ID: </span>[% city.cityid %]</li>
69 <label for="city_name" class="required">City: </label>
70 <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>
73 <label for="city_state">State: </label>
74 <input type="text" name="city_state" id="city_state" size="80" maxlength="100" value="[% city.city_state |html %]" />
77 <label for="city_zipcode" class="required">ZIP/Postal code: </label>
78 <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>
81 <label for="city_country">Country: </label>
82 <input type="text" name="city_country" id="city_country" size="80" maxlength="100" value="[% city.city_country |html %]" />
87 <fieldset class="action">
88 <input type="submit" value="Submit" />
89 <a class="cancel" href="/cgi-bin/koha/admin/cities.pl">Cancel</a>
94 [% IF op == 'delete_confirm' %]
95 <div class="dialog alert">
96 <h3>Delete city "[% city.city_name %]?"</h3>
99 <td>[% city.cityid %]</td>
102 <td>[% city.city_name %]</td>
105 <td>[% city.city_state %]</td>
107 <tr><th>ZIP/Postal code</th>
108 <td>[% city.city_zipcode %]</td>
111 <td>[% city.city_country %]</td>
114 <form action="/cgi-bin/koha/admin/cities.pl" method="post">
115 <input type="hidden" name="op" value="delete_confirmed" />
116 <input type="hidden" name="cityid" value="[% city.cityid %]" />
117 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
119 <form action="/cgi-bin/koha/admin/cities.pl" method="get">
120 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
125 [% IF op == 'list' %]
127 <div id="toolbar" class="btn-toolbar">
128 <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>
133 Searching: [% searchfield |html %]
136 [% IF cities.count %]
137 <table id="table_cities">
142 <th>ZIP/Postal code</th>
147 [% FOREACH city IN cities %]
149 <td>[% city.cityid %]</td>
150 <td>[% city.city_name %]</td>
151 <td>[% city.city_state %]</td>
152 <td>[% city.city_zipcode %]</td>
153 <td>[% city.city_country %]</td>
155 <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>
156 <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>
163 <div class="dialog message">
164 There are no cities defined. <a href="/cgi-bin/koha/admin/cities.pl?op=add_form">Create a new city</a>.
172 [% INCLUDE 'admin-menu.inc' %]
176 [% MACRO jsinclude BLOCK %]
177 <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu_[% KOHA_VERSION %].js"></script>
178 [% INCLUDE 'datatables.inc' %]
179 <script type="text/javascript">
180 $(document).ready(function() {
181 $("#table_cities").dataTable($.extend(true, {}, dataTablesDefaults, {
183 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
185 "aaSorting": [[ 1, "asc" ]],
186 "iDisplayLength": 10,
187 "sPaginationType": "full_numbers"
192 [% INCLUDE 'intranet-bottom.inc' %]