Bug 5917 / Bug 6085 : Fixing not being able to change language
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / branches.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Administration &rsaquo; Libraries and Groups
3 <!-- TMPL_IF NAME="editcategory" -->
4     &rsaquo;<!-- TMPL_IF NAME="categorycode" -->Edit Group <!-- TMPL_VAR NAME="categorycode" --><!-- TMPL_ELSE -->New Group<!-- /TMPL_IF -->
5 <!-- TMPL_ELSIF NAME="delete_category" -->
6     &rsaquo; Confirm Deletion of Group <!-- TMPL_VAR name="categorycode" -->
7 <!-- TMPL_ELSIF name="add" -->
8     &rsaquo;<!-- TMPL_IF name="heading_branches_add_branch_p" -->New library<!-- TMPL_ELSE -->Modify library <!-- TMPL_VAR name="branchcode" --><!-- /TMPL_IF -->
9 <!-- TMPL_ELSIF name="delete_confirm" -->
10     &rsaquo; Confirm deletion of library '<!-- TMPL_VAR NAME="branchcode" -->'
11 <!-- /TMPL_IF -->
12 </title>
13 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
14 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
15 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.pager.js"></script>
16 </head>
17 <body>
18 <!-- TMPL_INCLUDE NAME="header.inc" -->
19 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
20
21 <div id="breadcrumbs">
22     <a href="/cgi-bin/koha/mainpage.pl">Home</a>
23 &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
24 &rsaquo; <a href="/cgi-bin/koha/admin/branches.pl">Libraries and Groups</a>
25 <!-- TMPL_IF NAME="editcategory" -->
26 &rsaquo; <!-- TMPL_IF NAME="categorycode" -->Edit Group <!-- TMPL_VAR NAME="categorycode" --><!-- TMPL_ELSE -->New Group<!-- /TMPL_IF -->
27 <!-- TMPL_ELSIF NAME="delete_category" -->
28 &rsaquo; Confirm Deletion of Group <!-- TMPL_VAR name="categorycode" -->
29 <!-- TMPL_ELSIF name="add" -->
30 &rsaquo; <!-- TMPL_IF name="heading_branches_add_branch_p" -->New library<!-- TMPL_ELSE -->Modify library <!-- TMPL_VAR name="branchcode" --><!-- /TMPL_IF -->
31 <!-- TMPL_ELSIF name="delete_confirm" -->
32 &rsaquo; Confirm deletion of library '<!-- TMPL_VAR NAME="branchcode" -->'
33 <!-- /TMPL_IF -->
34 </div>
35
36 <div id="doc3" class="yui-t2">
37    
38    <div id="bd">
39         <div id="yui-main">
40         <div class="yui-b">
41         <!-- TMPL_IF name="else" -->
42         <div id="toolbar">
43         <script type="text/javascript">
44         //<![CDATA[
45
46         // prepare DOM for YUI Toolbar
47
48          $(document).ready(function() {
49             yuiToolbar();
50                 $.tablesorter.defaults.widgets = ['zebra']; 
51                 $("#branchest").tablesorter({
52                         sortList: [[0,0]],
53                         headers: { 3:{sorter:false},4:{sorter:false},5:{sorter:false},6:{sorter:false}}
54                 }).tablesorterPager({container: $("#pagerbranchest"),positionFixed: false,size: 10}); 
55                 }); 
56         // YUI Toolbar Functions
57
58         function yuiToolbar() {
59             new YAHOO.widget.Button("newbranch");
60                 new YAHOO.widget.Button("newcategory");
61         }
62
63         //]]>
64         </script>
65         <ul class="toolbar">
66         <li><a id="newbranch" href="/cgi-bin/koha/admin/branches.pl?op=add">New Library</a></li>
67         <li><a id="newcategory" href="/cgi-bin/koha/admin/branches.pl?op=editcategory">New Group</a></li>
68 </ul></div>
69 <!-- /TMPL_IF -->
70
71 <!-- TMPL_IF name="add" -->
72     <!-- TMPL_IF name="ERROR1" --><div class="dialog message">Library with that code already exists &mdash; Please enter a unique code</div><!-- /TMPL_IF -->
73   <h3><!-- TMPL_IF name="heading_branches_add_branch_p" -->New library<!-- TMPL_ELSE -->Modify library<!-- /TMPL_IF --></h3>
74     <form action="<!-- TMPL_VAR name="action" -->" name="Aform" method="post">
75         <fieldset class="rows">
76         <input type="hidden" name="op" value="add_validate" />
77         <!-- TMPL_IF name="heading_branches_add_branch_p" -->
78             <input type="hidden" name="add" value="1" />
79         <!-- TMPL_ELSE -->
80             <input type="hidden" name="add" value="0" />
81         <!-- /TMPL_IF -->
82         <ol><li>
83             <!-- TMPL_IF name="heading_branches_add_branch_p" -->
84             <label for="branchcode">Library code</label>
85                 <input type="text" name="branchcode" id="branchcode" size="10" maxlength="10" value="<!-- TMPL_VAR name="branchcode" escape="HTML" -->" />
86             <!-- TMPL_ELSE -->
87                         <label for="branchcode">Library code</label>
88                 <input type="hidden" name="branchcode" value="<!-- TMPL_VAR name="branchcode" escape="HTML" -->" />
89                 <!-- TMPL_VAR name="branchcode" -->
90             <!-- /TMPL_IF -->
91         </li>
92         <li>
93             <label for="branchname">Name</label>
94             <input type="text" name="branchname" id="branchname" size="40" maxlength="80" value="<!-- TMPL_VAR name="branch_name" escape="HTML" -->" />&nbsp;
95         </li>
96         </ol>
97         </fieldset>
98         <!-- TMPL_IF NAME="categoryloop" --><fieldset class="rows"><legend>Group(s):</legend>
99         <ol>
100                 <!-- TMPL_LOOP name="categoryloop" -->
101             <li><label for="<!-- TMPL_VAR name="categorycode" -->"><!-- TMPL_VAR name="categoryname" --></label>
102                 <input type="checkbox" id="<!-- TMPL_VAR name="categorycode" -->" name="<!-- TMPL_VAR name="categorycode" -->" <!-- TMPL_VAR name="checked" --> /> <span class="hint"><!-- TMPL_VAR name="codedescription" --></span>
103             </li>
104         <!-- /TMPL_LOOP -->
105                 </ol>
106 </fieldset><!-- /TMPL_IF -->
107         <fieldset class="rows">
108         <ol>
109         <li><label for="branchaddress1">Address Line 1</label><input type="text" name="branchaddress1" id="branchaddress1" value="<!-- TMPL_VAR name="branchaddress1" escape="HTML" -->" /></li>
110         <li><label for="branchaddress2">Address Line 2</label><input type="text" name="branchaddress2" id="branchaddress2" value="<!-- TMPL_VAR name="branchaddress2" escape="HTML" -->" /></li>
111         <li><label for="branchaddress3">Address Line 3</label><input type="text" name="branchaddress3" id="branchaddress3" value="<!-- TMPL_VAR name="branchaddress3" escape="HTML" -->" /></li>
112         <li><label for="branchcity">City</label><input type="text" name="branchcity" id="branchcity" value="<!-- TMPL_VAR name="branchcity" escape="HTML" -->" /></li>
113         <li><label for="branchstate">State</label><input type="text" name="branchstate" id="branchstate" value="<!-- TMPL_VAR name="branchstate" escape="HTML" -->" /></li>
114         <li><label for="branchzip">Zip/Postal Code</label><input type="text" name="branchzip" id="branchzip" value="<!-- TMPL_VAR name="branchzip" escape="HTML" -->" /></li>
115         <li><label for="branchcountry">Country</label><input type="text" name="branchcountry" id="branchcountry" value="<!-- TMPL_VAR name="branchcountry" escape="HTML" -->" /></li>
116         <li><label for="branchphone">Phone</label><input type="text" name="branchphone" id="branchphone" value="<!-- TMPL_VAR name="branchphone" escape="HTML" -->" /></li>
117         <li><label for="branchfax">Fax</label><input type="text" name="branchfax" id="branchfax" value="<!-- TMPL_VAR name="branchfax" escape="HTML" -->" /></li>
118         <li><label for="branchemail">Email</label><input type="text" name="branchemail" id="branchemail" value="<!-- TMPL_VAR name="branchemail" escape="HTML" -->" /></li>
119         <li><label for="branchurl">URL</label><input type="text" name="branchurl" id="branchurl" value="<!-- TMPL_VAR name="branchurl" escape="HTML" -->" /></li>
120         <li><label for="branchip">IP</label><input type="text" name="branchip" id="branchip" value="<!-- TMPL_VAR name="branchip" escape="HTML" -->" /> <span class="hint">Can be entered as a single IP, or a subnet such as 192.168.1.*</span></li>
121                 <!--
122         <li><label for="branchprinter">Library Printer</label>
123             <select id="branchprinter" name="branchprinter">
124                 <option value="">None</option>
125             <!-- TMPL_LOOP NAME="printerloop" -->
126                 <!-- TMPL_IF NAME="selected" -->
127                                 <option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchprinter" --></option>
128                                 <!-- TMPL_ELSE -->
129                                 <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchprinter" --></option>
130                                 <!-- /TMPL_IF -->
131                 <!-- /TMPL_LOOP -->
132             </select></li>
133                         -->
134         <li><label for="branchnotes">Notes</label><input type="text" name="branchnotes" id="branchnotes" value="<!-- TMPL_VAR name="branchnotes" escape="HTML" -->" /></li>
135         </ol>
136         </fieldset>
137         <fieldset class="action"><input type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a></fieldset>
138     </form>
139 <!-- /TMPL_IF -->
140
141 <!-- TMPL_IF name="delete_confirm" -->
142     <form action="<!-- TMPL_VAR name="action" -->" method="post">
143 <fieldset><legend>Confirm deletion of <!-- TMPL_VAR NAME="branchname" --> (<!-- TMPL_VAR NAME="branchcode" -->)?</legend><input type="hidden" name="op" value="delete_confirmed" />
144         <input type="hidden" name="branchcode" value="<!-- TMPL_VAR name="branchcode" escape="HTML" -->" />
145         <input type="hidden" name="branchname" value="<!-- TMPL_VAR NAME="branchname" escape="HTML" -->">
146         <fieldset class="action"><input type="submit" value="Delete Library" /> <a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a></fieldset>
147 </fieldset></form>
148 <!-- /TMPL_IF -->
149
150 <!-- TMPL_IF name="else" -->
151     <h3>Libraries</h3>
152     <!-- TMPL_IF NAME="message" --><div class="dialog message">
153         <!-- TMPL_VAR name="message" --></div><!-- /TMPL_IF -->
154     <!-- TMPL_IF name="MESSAGE1" --><div class="dialog message">Library not saved &mdash; code and/or name missing</div><!-- /TMPL_IF -->
155     <!-- TMPL_IF name="MESSAGE2" --><div class="dialog message">Library saved</div><!-- /TMPL_IF -->
156     <!-- TMPL_IF name="MESSAGE3" --><div class="dialog message">Library deleted</div><!-- /TMPL_IF -->
157     <!-- TMPL_IF name="MESSAGE4" --><div class="dialog message">Library category added</div><!-- /TMPL_IF -->
158     <!-- TMPL_IF name="MESSAGE5" --><div class="dialog message">Library category modified</div><!-- /TMPL_IF -->
159     <!-- TMPL_IF name="MESSAGE6" --><div class="dialog message">Library category deleted</div><!-- /TMPL_IF -->
160     <!-- TMPL_IF name="MESSAGE7" --><div class="dialog message">Library cannot be deleted because there are patrons and items using that library</div><!-- /TMPL_IF -->
161     <!-- TMPL_IF name="MESSAGE8" --><div class="dialog message">Category cannot be deleted because there are libraries using that category</div><!-- /TMPL_IF -->
162     <!-- TMPL_IF name="MESSAGE9" --><div class="dialog message">Category cannot be added, categorycode already exists</div><!-- /TMPL_IF -->
163     <!-- TMPL_IF name="MESSAGE10" --><div class="dialog message">Library cannot be deleted because there are items held by that library</div><!-- /TMPL_IF -->
164     <!-- TMPL_IF name="MESSAGE11" --><div class="dialog message">Library cannot be deleted because there are patrons registered at that library</div><!-- /TMPL_IF -->
165 <!-- TMPL_IF NAME="branches" -->
166 <span id="pagerbranchest" class="pager">
167         <form class="formpager">&nbsp;<strong>page(s)</strong>&nbsp;:
168                 <img src="<!-- TMPL_VAR name="interface" -->/prog/img/first.png" class="first"/>
169                 <img src="<!-- TMPL_VAR name="interface" -->/prog/img/prev.png" class="prev"/>
170                 <input type="text" size="5" class="pagedisplay"/>
171                 <img src="<!-- TMPL_VAR name="interface" -->/prog/img/next.png" class="next"/>
172                 <img src="<!-- TMPL_VAR name="interface" -->/prog/img/last.png" class="last"/>
173                 , entries/page : 
174                 <select class="pagesize">
175                 <option selected="selected" value="10">10</option>
176                         <option value="20">20</option>
177                         <option value="30">30</option>
178                         <option value="40">40</option>
179                         <option value="50">50</option>
180                         <option value="100">100</option>
181                 </select>
182         </form>
183 </span>
184     <table id="branchest">
185 <thead><tr>
186                         <th>Name</th>
187             <th>Code</th>
188             <th>Address</th>
189             <th>Properties</th>
190             <th>IP</th>
191             <!-- <th>Printer</th> -->
192             <th colspan="2">&nbsp;</th>
193         </tr></thead><tbody>
194         <!-- TMPL_LOOP name="branches" -->
195         <!-- TMPL_IF NAME="__odd__" -->
196         <tr>
197         <!-- TMPL_ELSE -->
198                 <tr class="highlight">
199         <!-- /TMPL_IF -->
200                 <td><!-- TMPL_VAR name="branch_name" escape="HTML" --></td>
201                 <td><!-- TMPL_VAR name="branch_code" escape="HTML" --></td>
202                 <td>
203                     <!-- TMPL_IF name="address_empty_p" -->
204                         (nothing entered)
205                     <!-- TMPL_ELSE -->
206                         <!-- TMPL_IF name="branchaddress1" -->
207                             <!-- TMPL_VAR name="branchaddress1" escape="HTML" --><!-- /TMPL_IF -->
208                         <!-- TMPL_IF name="branchaddress2" -->
209                             <br /><!-- TMPL_VAR name="branchaddress2" escape="HTML" --><!-- /TMPL_IF -->
210                         <!-- TMPL_IF name="branchaddress3" -->
211                             <br /><!-- TMPL_VAR name="branchaddress3" escape="HTML" --><!-- /TMPL_IF -->
212                         <!-- TMPL_IF name="branchzip" -->
213                             <br /><!-- TMPL_VAR name="branchzip" escape="HTML" --><!-- /TMPL_IF -->
214                         <!-- TMPL_IF name="branchcity" -->
215                             <br /><!-- TMPL_VAR name="branchcity" escape="HTML" --><!-- /TMPL_IF --><!-- TMPL_IF name="branchstate" -->, 
216                             <!-- TMPL_VAR name="branchstate" escape="HTML" --><!-- /TMPL_IF -->
217                         <!-- TMPL_IF name="branchcountry" -->
218                             <br /><!-- TMPL_VAR name="branchcountry" escape="HTML" --><!-- /TMPL_IF -->
219                         <!-- TMPL_IF name="branchphone" -->
220                             <br />Ph: <!-- TMPL_VAR name="branchphone" escape="HTML" --><!-- /TMPL_IF -->
221                         <!-- TMPL_IF name="branchfax" -->
222                             <br />Fax: <!-- TMPL_VAR name="branchfax" escape="HTML" --><!-- /TMPL_IF -->
223                         <!-- TMPL_IF name="branchemail" -->
224                             <br />Email: <!-- TMPL_VAR name="branchemail" escape="HTML" --><!-- /TMPL_IF -->
225                         <!-- TMPL_IF name="branchurl" -->
226                             <br />URL: <!-- TMPL_VAR name="branchurl" escape="HTML" --><!-- /TMPL_IF -->
227                         <!-- TMPL_IF name="branchnotes" -->
228                             <br />Notes: <!-- TMPL_VAR name="branchnotes" escape="HTML" --><!-- /TMPL_IF -->
229                     <!-- /TMPL_IF -->
230                 </td>
231                 <td>
232                     <!-- TMPL_UNLESS name="no_categories_p" -->
233                         <!-- TMPL_LOOP name="category_list" -->
234                             <!-- TMPL_VAR name="categoryname" --><br />
235                         <!-- /TMPL_LOOP -->
236                     <!-- /TMPL_UNLESS -->
237                 </td>
238                 <td>
239                     <!-- TMPL_VAR NAME="branchip" -->
240                 </td>
241                 <!-- <td>
242                     <!-- TMPL_VAR NAME="branchprinter" -->
243                 </td> -->
244                 <td>
245                     <a href="<!-- TMPL_VAR name="action" -->?op=edit&amp;branchcode=<!-- TMPL_VAR name="value" escape="url" -->">Edit</a>
246                 </td>
247                 <td>
248                     <a href="<!-- TMPL_VAR name="action" -->?branchcode=<!-- TMPL_VAR name="value" escape="url" -->&amp;branchname=<!-- TMPL_VAR NAME="branch_name" escape="url" -->&amp;op=delete">Delete</a>
249                 </td>
250             </tr>
251         <!-- /TMPL_LOOP --></tbody>
252     </table>
253         <!-- TMPL_ELSE -->
254         <div class="dialog message">There are no libraries defined. <a href="/cgi-bin/koha/admin/branches.pl?op=add">Start defining libraries</a>.</div>
255         <!-- /TMPL_IF -->
256     
257    <!-- TMPL_IF   NAME="branchcategories" -->
258    <!-- TMPL_LOOP NAME="branchcategories" -->
259     <h3>Group(s):  <!-- TMPL_IF NAME="properties" -->Properties<!-- TMPL_ELSE --><!-- TMPL_IF NAME="searchdomain" -->Search Domain<!-- /TMPL_IF --><!-- /TMPL_IF --></h3>
260         <table>
261     <tr>
262         <th>Name</th>
263         <th>Code</th>
264         <th>Description</th>
265         <th>&nbsp;</th>
266         <th>&nbsp;</th>
267     </tr>
268 <!-- TMPL_IF NAME="catloop" --><!-- TMPL_LOOP name="catloop" -->
269         <tr>
270         <td><!-- TMPL_VAR name="categoryname" --></td>
271         <td><!-- TMPL_VAR name="categorycode" --></td>
272         <td><!-- TMPL_VAR name="codedescription" --></td>
273         <td><a href="<!-- TMPL_VAR name="action" -->?op=editcategory&amp;categorycode=<!-- TMPL_VAR name="categorycode" escape="url" -->">Edit</a>
274         </td>
275         <td><a href="<!-- TMPL_VAR name="action" -->?op=delete_category&amp;categorycode=<!-- TMPL_VAR name="categorycode" escape="url" -->">Delete</a>
276         </td>
277         </tr>
278     <!-- /TMPL_LOOP --><!-- TMPL_ELSE --><tr><td colspan="5">No <!-- TMPL_IF NAME="properties" -->Properties<!-- TMPL_ELSIF NAME="searchdomain" -->Search Domain<!-- /TMPL_IF --> Defined</td></tr><!-- /TMPL_IF -->
279     </table>
280     <!-- /TMPL_LOOP -->
281     <!-- TMPL_ELSE -->
282         <p>No Groups defined.</p>
283     <!-- /TMPL_IF --> <!-- NAME="branchcategories" -->
284 <!-- /TMPL_IF -->
285
286 <!-- TMPL_IF name="editcategory" -->
287     <h3><!-- TMPL_IF NAME="categorycode" -->Edit Group <!-- TMPL_VAR NAME="categorycode" --><!-- TMPL_ELSE -->Add Group<!-- /TMPL_IF --></h3>
288     <form action="<!-- TMPL_VAR name="action" -->" name="Aform" method="post">
289     <input type="hidden" name="op" value="addcategory_validate" />
290         <!-- TMPL_IF NAME="categorycode" -->
291         <input type="hidden" name="add" value="0">
292         <!-- TMPL_ELSE -->
293         <input type="hidden" name="add" value="1">
294         <!-- /TMPL_IF -->
295     <fieldset class="rows">
296         
297         <ol><li>
298                 <!-- TMPL_IF name="categorycode" -->
299                                 <span class="label">Category code: </span>
300                     <input type="hidden" name="categorycode" id="categorycode" value="<!-- TMPL_VAR name="categorycode" escape="HTML" -->" />
301                     <!-- TMPL_VAR name="categorycode" -->
302                 <!-- TMPL_ELSE -->
303                 <label for="categorycode">Category code:</label>
304                     <input type="text" name="categorycode" id="categorycode" size="11" maxlength="10" value="<!-- TMPL_VAR name="categorycode" escape="HTML" -->" />
305                 <!-- /TMPL_IF -->
306             </li>
307         <li>
308             <label for="categoryname">Name: </label>
309             <input type="text" name="categoryname" id="categoryname" size="40" maxlength="80" value="<!-- TMPL_VAR name="categoryname" escape="HTML" -->" />
310         </li>
311         <li>
312             <label for="codedescription">Description: </label>
313             <input type="text" name="codedescription" id="codedescription" size="70" maxlength="80" value="<!-- TMPL_VAR name="codedescription" escape="HTML" -->" />
314         </li>
315                 <li>
316                 <label for="categorytype">Category Type: </label>
317             <select id="categorytype" name="categorytype">
318             <!-- TMPL_LOOP NAME="categorytype" -->
319                 <!-- TMPL_IF NAME="selected" -->
320                     <option value="<!-- TMPL_VAR NAME="type" -->" selected="selected">
321                 <!-- TMPL_ELSE -->
322                     <option value="<!-- TMPL_VAR NAME="type" -->">
323                 <!-- /TMPL_IF --> <!-- TMPL_VAR NAME="type" --></option>
324             <!-- /TMPL_LOOP -->
325             </select>
326                 </li>
327                 </ol>
328     </fieldset>
329         <fieldset class="action"><input type="submit" value="Update" /></fieldset>
330     </form>
331 <!-- /TMPL_IF -->
332
333 <!-- TMPL_IF name="delete_category" -->
334     <!-- TMPL_UNLESS name="MESSAGE8" -->
335     <div class="dialog message"> 
336     Confirm delete:
337     <form action="<!-- TMPL_VAR name="action" -->" method="post">
338         <input type="hidden" name="op" value="categorydelete_confirmed" />
339         <input type="hidden" name="categorycode" value="<!-- TMPL_VAR name="categorycode" escape="HTML" -->" />
340         <input type="submit" value="YES" />
341     </form>
342     <form action="<!-- TMPL_VAR name="action" -->" method="post"><input type="hidden" name="op" value="">
343         <input type="submit" value="NO" />
344     </form>
345     </div>
346     <!-- /TMPL_UNLESS -->
347 <!-- /TMPL_IF -->
348
349 </div>
350 </div>
351 <div class="yui-b">
352 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
353 </div>
354 </div>
355 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->