Merge branch 'bug_7969' into 3.12-master
[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 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
5 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.pager.js"></script>
6 <script type="text/javascript" id="js">$(document).ready(function() {
7         $.tablesorter.defaults.widgets = ['zebra'];
8         $("#table_cities").tablesorter({
9                 sortList: [[1,0]],
10                 headers: { 5: { sorter: false},6: { sorter: false}}
11         }).tablesorterPager({container: $("#pagertable_cities"),positionFixed: false,size: 20});
12 }); </script>
13 <script type="text/javascript">
14 //<![CDATA[
15     function Check(f) {
16         if (f.city_zipcode.value.length == 0 && f.city_name.value.length == 0 ) {
17             alert(_("City name & zipcode missing"));
18         } else{
19             document.Aform.submit();
20         }
21     }
22 //]]>
23 </script>
24 </head>
25 <body id="admin_cities" class="admin">
26 [% INCLUDE 'header.inc' %]
27 [% INCLUDE 'cities-admin-search.inc' %]
28
29 <div id="breadcrumbs">
30     <a href="/cgi-bin/koha/mainpage.pl">Home</a>
31     &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
32     &rsaquo; <a href="/cgi-bin/koha/admin/cities.pl">Cities</a>
33     [% IF ( add_form ) %]
34     &rsaquo; [% IF ( cityid ) %]Modify[% ELSE %]New[% END %] City
35     [% ELSIF ( delete_confirm ) %]
36     &rsaquo; Confirm deletion of city
37     [% END %]
38 </div>
39
40 <div id="doc3" class="yui-t2">
41    
42    <div id="bd">
43         <div id="yui-main">
44         <div class="yui-b">
45
46 [% IF ( add_form ) %]
47         [% IF ( cityid ) %]
48                 <h1>Modify a city</h1>
49         [% ELSE %]
50                 <h1>New city</h1>
51         [% END %]
52
53         <form action="[% script_name %]" name="Aform" method="post">
54         <input type="hidden" name="op" value="add_validate" />
55         <input type="hidden" name="checked" value="0" />
56         <input type="hidden" name="cityid" value="[% cityid %]" />
57
58 <fieldset class="rows"><ol>     [% IF ( cityid ) %]
59                 <li>
60                 <span class="label">City ID: </span>[% cityid %]</li>
61         [% END %]
62         <li>
63         <label for="city_name" class="required" title="required">City: </label>
64         <input type="text" name="city_name" id="city_name" size="80" maxlength="100" value="[% city_name |html %]" />
65         </li>
66         <li>
67         <label for="city_state">State: </label>
68         <input type="text" name="city_state" id="city_state" size="80" maxlength="100" value="[% city_state |html %]" />
69         </li>
70         <li>                            
71         <label for="city_zipcode" class="required" title="required">Zip/Postal code: </label>
72         <input type="text" name="city_zipcode" id="city_zipcode" size="20" maxlength="20" value="[% city_zipcode %]" />
73         </li>
74         <li>
75         <label for="city_country">Country: </label>
76         <input type="text" name="city_country" id="city_country" size="80" maxlength="100" value="[% city_country |html %]" />
77         </li></ol></fieldset>
78         
79         <fieldset class="action">
80                 <input class="button" type="button" onclick="Check(this.form)" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/admin/cities.pl">Cancel</a>
81         </fieldset>
82         </form>
83
84 [% END %]
85 [% IF ( delete_confirm ) %]
86     <div class="dialog alert">
87     <h3>Delete City "[% city_name %]?"</h3>
88     <table>
89         <tr><th>City id</th>
90             <td>[% cityid %]</td>
91         </tr>
92         <tr><th>City</th>
93             <td>[% city_name %]</td>
94         </tr>
95         <tr><th>State</th>
96             <td>[% city_state %]</td>
97         </tr>
98         <tr><th>Zip/Postal code</th>
99             <td>[% city_zipcode %]</td>
100         </tr>
101         <tr><th>Country</th>
102             <td>[% city_country %]</td>
103         </tr>
104     </table>
105     <form action="[% script_name %]" method="post">
106         <input type="hidden" name="op" value="delete_confirmed" />
107         <input type="hidden" name="cityid" value="[% cityid %]" />
108         <input type="submit" class="approve" value="Yes, Delete" />
109     </form>
110     <form action="[% script_name %]" method="get">
111         <input type="submit" class="deny" value="No, do not Delete" />
112     </form>
113 </div>
114 [% END %]
115
116 [% IF ( else ) %]
117
118 <div id="toolbar" class="btn-toolbar">
119     <a class="btn btn-small" id="newcity" href="[% script_name %]?op=add_form"><i class="icon-plus"></i> New city</a>
120 </div>
121
122         <h2>Cities</h2>
123         [% IF ( searchfield ) %]
124                 Searching: [% searchfield %]
125         [% END %]
126
127 [% IF ( loop ) %]
128 <div id="pagertable_cities">
129 [% INCLUDE 'table-pager.inc' perpage='20' %]
130 </div>
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