4 [% INCLUDE 'doc-head-open.inc' %]
5 <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>
6 [% INCLUDE 'doc-head-close.inc' %]
7 [% Asset.css("css/datatables.css") | $raw %]
10 <body id="admin_cities" class="admin">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'cities-admin-search.inc' %]
14 <div id="breadcrumbs">
15 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
16 › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
17 › <a href="/cgi-bin/koha/admin/cities.pl">Cities</a>
18 [% IF op == 'add_form' %]
19 › [% IF city.cityid %]Modify[% ELSE %]New[% END %] City
20 [% ELSIF op == 'delete_confirm' %]
21 › Confirm deletion of city
25 <div class="main container-fluid">
27 <div class="col-sm-10 col-sm-push-2">
30 [% FOR m IN messages %]
31 <div class="dialog [% m.type | html %]">
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 | html %]" />
64 <fieldset class="rows">
67 <li><span class="label">City ID: </span>[% city.cityid | html %]</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 | html %]" 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 | html %]?"</h3>
100 <td>[% city.cityid | html %]</td>
103 <td>[% city.city_name | html %]</td>
106 <td>[% city.city_state | html %]</td>
108 <tr><th>ZIP/Postal code</th>
109 <td>[% city.city_zipcode | html %]</td>
112 <td>[% city.city_country | html %]</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 | html %]" />
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">
144 <th>ZIP/Postal code</th>
150 [% FOREACH city IN cities %]
152 <td>[% city.cityid | html %]</td>
153 <td>[% city.city_name | html %]</td>
154 <td>[% city.city_state | html %]</td>
155 <td>[% city.city_zipcode | html %]</td>
156 <td>[% city.city_country | html %]</td>
158 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/cities.pl?op=add_form&cityid=[% city.cityid | html %]"><i class="fa fa-pencil"></i> Edit</a>
159 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/cities.pl?op=delete_confirm&cityid=[% city.cityid | html %]"><i class="fa fa-trash"></i> Delete</a>
166 <div class="dialog message">
167 There are no cities defined. <a href="/cgi-bin/koha/admin/cities.pl?op=add_form">Create a new city</a>.
173 </div> <!-- /.col-sm-10.col-sm-push-2 -->
175 <div class="col-sm-2 col-sm-pull-10">
177 [% INCLUDE 'admin-menu.inc' %]
179 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
180 </div> <!-- /.row -->
182 [% MACRO jsinclude BLOCK %]
183 [% Asset.js("js/admin-menu.js") | $raw %]
184 [% INCLUDE 'datatables.inc' %]
186 $(document).ready(function() {
187 $("#table_cities").dataTable($.extend(true, {}, dataTablesDefaults, {
189 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
191 "aaSorting": [[ 1, "asc" ]],
192 "iDisplayLength": 10,
193 "sPaginationType": "full_numbers"
198 [% INCLUDE 'intranet-bottom.inc' %]