Merge remote-tracking branch 'origin/new/bug_5604'
[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     $(document).ready(function() {
23         new YAHOO.widget.Button("newcity");
24     });
25 //]]>
26 </script>
27 </head>
28 <body>
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">
122         <ul class="toolbar">
123         <li><a id="newcity" href="[% script_name %]?op=add_form">New City</a></li>
124 </ul></div>
125
126         <h2>Cities</h2>
127         [% IF ( searchfield ) %]
128                 Searching: [% searchfield %]
129         [% END %]
130
131 [% IF ( loop ) %]
132 <div id="pagertable_cities">
133 [% INCLUDE 'table-pager.inc' perpage='20' %]
134 </div>
135 <table id="table_cities">
136                 <thead>
137                         <th>City ID</th>
138                         <th>City</th>
139                         <th>State</th>
140                         <th>Zip/Postal code</th>
141                         <th>Country</th>
142                         <th>&nbsp;</th>
143                         <th>&nbsp;</th>
144                 </thead>
145                 [% FOREACH loo IN loop %]
146                 [% UNLESS ( loop.odd ) %]
147                 <tr class="highlight">
148                 [% ELSE %]
149                 <tr>
150                 [% END %]
151                         <td>[% loo.cityid %]</td>
152                         <td>[% loo.city_name %]</td>
153                         <td>[% loo.city_state %]</td>
154                         <td>[% loo.city_zipcode %]</td>
155                         <td>[% loo.city_country %]</td>
156                         <td><a href="[% loo.script_name %]?op=add_form&amp;cityid=[% loo.cityid %]">Edit</a></td>
157                         <td><a href="[% loo.script_name %]?op=delete_confirm&amp;cityid=[% loo.cityid %]">Delete</a></td>
158                 </tr>
159                 [% END %]
160         </table>[% END %]
161 [% END %]
162
163 </div>
164 </div>
165 <div class="yui-b">
166 [% INCLUDE 'admin-menu.inc' %]
167 </div>
168 </div>
169 [% INCLUDE 'intranet-bottom.inc' %]
170