Merge commit 'kc/master'
[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 </head>
16 <body>
17 <!-- TMPL_INCLUDE NAME="header.inc" -->
18 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
19
20 <div id="breadcrumbs">
21     <a href="/cgi-bin/koha/mainpage.pl">Home</a>
22 &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
23 &rsaquo; <a href="/cgi-bin/koha/admin/branches.pl">Libraries and Groups</a>
24 <!-- TMPL_IF NAME="editcategory" -->
25 &rsaquo; <!-- TMPL_IF NAME="categorycode" -->Edit Group <!-- TMPL_VAR NAME="categorycode" --><!-- TMPL_ELSE -->New Group<!-- /TMPL_IF -->
26 <!-- TMPL_ELSIF NAME="delete_category" -->
27 &rsaquo; Confirm Deletion of Group <!-- TMPL_VAR name="categorycode" -->
28 <!-- TMPL_ELSIF name="add" -->
29 &rsaquo; <!-- TMPL_IF name="heading-branches-add-branch-p" -->New library<!-- TMPL_ELSE -->Modify library <!-- TMPL_VAR name="branchcode" --><!-- /TMPL_IF -->
30 <!-- TMPL_ELSIF name="delete_confirm" -->
31 &rsaquo; Confirm deletion of library '<!-- TMPL_VAR NAME="branchcode" -->'
32 <!-- /TMPL_IF -->
33 </div>
34
35 <div id="doc3" class="yui-t2">
36    
37    <div id="bd">
38         <div id="yui-main">
39         <div class="yui-b">
40         <!-- TMPL_IF name="else" -->
41         <div id="toolbar">
42         <script type="text/javascript">
43         //<![CDATA[
44
45         // prepare DOM for YUI Toolbar
46
47          $(document).ready(function() {
48             yuiToolbar();
49                 $.tablesorter.defaults.widgets = ['zebra']; 
50                 $("#branchest").tablesorter({
51                         sortList: [[0,0]],
52                         headers: { 3:{sorter:false},4:{sorter:false},5:{sorter:false},6:{sorter:false}}
53                 }); 
54          });
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, State</label><input type="text" name="branchcity" id="branchcity" value="<!-- TMPL_VAR name="branchcity" escape="HTML" -->" /></li>
113         <li><label for="branchzip">Zip/Postal Code</label><input type="text" name="branchzip" id="branchzip" value="<!-- TMPL_VAR name="branchzip" escape="HTML" -->" /></li>
114         <li><label for="branchcountry">Country</label><input type="text" name="branchcountry" id="branchcountry" value="<!-- TMPL_VAR name="branchcountry" escape="HTML" -->" /></li>
115         <li><label for="branchphone">Phone</label><input type="text" name="branchphone" id="branchphone" value="<!-- TMPL_VAR name="branchphone" escape="HTML" -->" /></li>
116         <li><label for="branchfax">Fax</label><input type="text" name="branchfax" id="branchfax" value="<!-- TMPL_VAR name="branchfax" escape="HTML" -->" /></li>
117         <li><label for="branchemail">Email</label><input type="text" name="branchemail" id="branchemail" value="<!-- TMPL_VAR name="branchemail" escape="HTML" -->" /></li>
118         <li><label for="branchurl">URL</label><input type="text" name="branchurl" id="branchurl" value="<!-- TMPL_VAR name="branchurl" escape="HTML" -->" /></li>
119         <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>
120                 <!--
121         <li><label for="branchprinter">Library Printer</label>
122             <select id="branchprinter" name="branchprinter">
123                 <option value="">None</option>
124             <!-- TMPL_LOOP NAME="printerloop" -->
125                 <!-- TMPL_IF NAME="selected" -->
126                                 <option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchprinter" --></option>
127                                 <!-- TMPL_ELSE -->
128                                 <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchprinter" --></option>
129                                 <!-- /TMPL_IF -->
130                 <!-- /TMPL_LOOP -->
131             </select></li>
132                         -->
133         <li><label for="branchnotes">Notes</label><input type="text" name="branchnotes" id="branchnotes" value="<!-- TMPL_VAR name="branchnotes" escape="HTML" -->" /></li>
134         </ol>
135         </fieldset>
136         <fieldset class="action"><input type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a></fieldset>
137     </form>
138 <!-- /TMPL_IF -->
139
140 <!-- TMPL_IF name="delete_confirm" -->
141     <form action="<!-- TMPL_VAR name="action" -->" method="post">
142 <fieldset><legend>Confirm deletion of <!-- TMPL_VAR NAME="branchname" --> (<!-- TMPL_VAR NAME="branchcode" -->)?</legend><input type="hidden" name="op" value="delete_confirmed" />
143         <input type="hidden" name="branchcode" value="<!-- TMPL_VAR name="branchcode" escape="HTML" -->" />
144         <input type="hidden" name="branchname" value="<!-- TMPL_VAR NAME="branchname" escape="HTML" -->">
145         <fieldset class="action"><input type="submit" value="Delete Library" /> <a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a></fieldset>
146 </fieldset></form>
147 <!-- /TMPL_IF -->
148
149 <!-- TMPL_IF name="else" -->
150     <h3>Libraries</h3>
151     <!-- TMPL_IF NAME="message" --><div class="dialog message">
152         <!-- TMPL_VAR name="message" --></div><!-- /TMPL_IF -->
153     <!-- TMPL_IF name="MESSAGE1" --><div class="dialog message">Library not saved &mdash; code and/or name missing</div><!-- /TMPL_IF -->
154     <!-- TMPL_IF name="MESSAGE2" --><div class="dialog message">Library saved</div><!-- /TMPL_IF -->
155     <!-- TMPL_IF name="MESSAGE3" --><div class="dialog message">Library deleted</div><!-- /TMPL_IF -->
156     <!-- TMPL_IF name="MESSAGE4" --><div class="dialog message">Library category added</div><!-- /TMPL_IF -->
157     <!-- TMPL_IF name="MESSAGE5" --><div class="dialog message">Library category modified</div><!-- /TMPL_IF -->
158     <!-- TMPL_IF name="MESSAGE6" --><div class="dialog message">Library category deleted</div><!-- /TMPL_IF -->
159     <!-- TMPL_IF name="MESSAGE7" --><div class="dialog message">Library cannot be deleted because there are patrons and items using that library</div><!-- /TMPL_IF -->
160     <!-- TMPL_IF name="MESSAGE8" --><div class="dialog message">Category cannot be deleted because there are libraries using that category</div><!-- /TMPL_IF -->
161     <!-- TMPL_IF name="MESSAGE9" --><div class="dialog message">Category cannot be added, categorycode already exists</div><!-- /TMPL_IF -->
162     <!-- TMPL_IF name="MESSAGE10" --><div class="dialog message">Library cannot be deleted because there are items held by that library</div><!-- /TMPL_IF -->
163     <!-- TMPL_IF name="MESSAGE11" --><div class="dialog message">Library cannot be deleted because there are patrons registered at that library</div><!-- /TMPL_IF -->
164 <!-- TMPL_IF NAME="branches" -->
165     <table id="branchest">
166 <thead><tr>
167                         <th>Name</th>
168             <th>Code</th>
169             <th>Address</th>
170             <th>Properties</th>
171             <th>IP</th>
172             <!-- <th>Printer</th> -->
173             <th colspan="2">&nbsp;</th>
174         </tr></thead><tbody>
175         <!-- TMPL_LOOP name="branches" -->
176         <!-- TMPL_IF NAME="__odd__" -->
177         <tr>
178         <!-- TMPL_ELSE -->
179                 <tr class="highlight">
180         <!-- /TMPL_IF -->
181                 <td><!-- TMPL_VAR name="branch_name" escape="HTML" --></td>
182                 <td><!-- TMPL_VAR name="branch_code" escape="HTML" --></td>
183                 <td>
184                     <!-- TMPL_IF name="address-empty-p" -->
185                         (nothing entered)
186                     <!-- TMPL_ELSE -->
187                         <!-- TMPL_IF name="branchaddress1" -->
188                             <!-- TMPL_VAR name="branchaddress1" escape="HTML" --><!-- /TMPL_IF -->
189                         <!-- TMPL_IF name="branchaddress2" -->
190                             <br /><!-- TMPL_VAR name="branchaddress2" escape="HTML" --><!-- /TMPL_IF -->
191                         <!-- TMPL_IF name="branchaddress3" -->
192                             <br /><!-- TMPL_VAR name="branchaddress3" escape="HTML" --><!-- /TMPL_IF -->
193                         <!-- TMPL_IF name="branchzip" -->
194                             <br /><!-- TMPL_VAR name="branchzip" escape="HTML" --><!-- /TMPL_IF -->
195                         <!-- TMPL_IF name="branchcity" -->
196                             <br /><!-- TMPL_VAR name="branchcity" escape="HTML" --><!-- /TMPL_IF -->
197                         <!-- TMPL_IF name="branchcountry" -->
198                             <br /><!-- TMPL_VAR name="branchcountry" escape="HTML" --><!-- /TMPL_IF -->
199                         <!-- TMPL_IF name="branchphone" -->
200                             <br />Ph: <!-- TMPL_VAR name="branchphone" escape="HTML" --><!-- /TMPL_IF -->
201                         <!-- TMPL_IF name="branchfax" -->
202                             <br />Fax: <!-- TMPL_VAR name="branchfax" escape="HTML" --><!-- /TMPL_IF -->
203                         <!-- TMPL_IF name="branchemail" -->
204                             <br />Email: <!-- TMPL_VAR name="branchemail" escape="HTML" --><!-- /TMPL_IF -->
205                         <!-- TMPL_IF name="branchurl" -->
206                             <br />URL: <!-- TMPL_VAR name="branchurl" escape="HTML" --><!-- /TMPL_IF -->
207                         <!-- TMPL_IF name="branchnotes" -->
208                             <br />Notes: <!-- TMPL_VAR name="branchnotes" escape="HTML" --><!-- /TMPL_IF -->
209                     <!-- /TMPL_IF -->
210                 </td>
211                 <td>
212                     <!-- TMPL_UNLESS name="no-categories-p" -->
213                         <!-- TMPL_LOOP name="category_list" -->
214                             <!-- TMPL_VAR name="categoryname" --><br />
215                         <!-- /TMPL_LOOP -->
216                     <!-- /TMPL_UNLESS -->
217                 </td>
218                 <td>
219                     <!-- TMPL_VAR NAME="branchip" -->
220                 </td>
221                 <!-- <td>
222                     <!-- TMPL_VAR NAME="branchprinter" -->
223                 </td> -->
224                 <td>
225                     <a href="<!-- TMPL_VAR name="action" -->?op=edit&amp;branchcode=<!-- TMPL_VAR name="value" escape="url" -->">Edit</a>
226                 </td>
227                 <td>
228                     <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>
229                 </td>
230             </tr>
231         <!-- /TMPL_LOOP --></tbody>
232     </table>
233         <!-- TMPL_ELSE -->
234         <div class="dialog message">There are no libraries defined. <a href="/cgi-bin/koha/admin/branches.pl?op=add">Start defining libraries</a>.</div>
235         <!-- /TMPL_IF -->
236     
237    <!-- TMPL_IF   NAME="branchcategories" -->
238    <!-- TMPL_LOOP NAME="branchcategories" -->
239     <h3>Group(s):  <!-- TMPL_IF NAME="properties" -->Properties<!-- TMPL_ELSE --><!-- TMPL_IF NAME="searchdomain" -->Search Domain<!-- /TMPL_IF --><!-- /TMPL_IF --></h3>
240         <table>
241     <tr>
242         <th>Name</th>
243         <th>Code</th>
244         <th>Description</th>
245         <th>&nbsp;</th>
246         <th>&nbsp;</th>
247     </tr>
248 <!-- TMPL_IF NAME="catloop" --><!-- TMPL_LOOP name="catloop" -->
249         <tr>
250         <td><!-- TMPL_VAR name="categoryname" --></td>
251         <td><!-- TMPL_VAR name="categorycode" --></td>
252         <td><!-- TMPL_VAR name="codedescription" --></td>
253         <td><a href="<!-- TMPL_VAR name="action" -->?op=editcategory&amp;categorycode=<!-- TMPL_VAR name="categorycode" escape="url" -->">Edit</a>
254         </td>
255         <td><a href="<!-- TMPL_VAR name="action" -->?op=delete_category&amp;categorycode=<!-- TMPL_VAR name="categorycode" escape="url" -->">Delete</a>
256         </td>
257         </tr>
258     <!-- /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 -->
259     </table>
260     <!-- /TMPL_LOOP -->
261     <!-- TMPL_ELSE -->
262         <p>No Groups defined.</p>
263     <!-- /TMPL_IF --> <!-- NAME="branchcategories" -->
264 <!-- /TMPL_IF -->
265
266 <!-- TMPL_IF name="editcategory" -->
267     <h3><!-- TMPL_IF NAME="categorycode" -->Edit Group <!-- TMPL_VAR NAME="categorycode" --><!-- TMPL_ELSE -->Add Group<!-- /TMPL_IF --></h3>
268     <form action="<!-- TMPL_VAR name="action" -->" name="Aform" method="post">
269     <input type="hidden" name="op" value="addcategory_validate" />
270         <!-- TMPL_IF NAME="categorycode" -->
271         <input type="hidden" name="add" value="0">
272         <!-- TMPL_ELSE -->
273         <input type="hidden" name="add" value="1">
274         <!-- /TMPL_IF -->
275     <fieldset class="rows">
276         
277         <ol><li>
278                 <!-- TMPL_IF name="categorycode" -->
279                                 <span class="label">Category code: </span>
280                     <input type="hidden" name="categorycode" id="categorycode" value="<!-- TMPL_VAR name="categorycode" escape="HTML" -->" />
281                     <!-- TMPL_VAR name="categorycode" -->
282                 <!-- TMPL_ELSE -->
283                 <label for="categorycode">Category code:</label>
284                     <input type="text" name="categorycode" id="categorycode" size="11" maxlength="10" value="<!-- TMPL_VAR name="categorycode" escape="HTML" -->" />
285                 <!-- /TMPL_IF -->
286             </li>
287         <li>
288             <label for="categoryname">Name: </label>
289             <input type="text" name="categoryname" id="categoryname" size="40" maxlength="80" value="<!-- TMPL_VAR name="categoryname" escape="HTML" -->" />
290         </li>
291         <li>
292             <label for="codedescription">Description: </label>
293             <input type="text" name="codedescription" id="codedescription" size="70" maxlength="80" value="<!-- TMPL_VAR name="codedescription" escape="HTML" -->" />
294         </li>
295                 <li>
296                 <label for="categorytype">Category Type: </label>
297             <select id="categorytype" name="categorytype">
298             <!-- TMPL_LOOP NAME="categorytype" -->
299                 <!-- TMPL_IF NAME="selected" -->
300                     <option value="<!-- TMPL_VAR NAME="type" -->" selected="selected">
301                 <!-- TMPL_ELSE -->
302                     <option value="<!-- TMPL_VAR NAME="type" -->">
303                 <!-- /TMPL_IF --> <!-- TMPL_VAR NAME="type" --></option>
304             <!-- /TMPL_LOOP -->
305             </select>
306                 </li>
307                 </ol>
308     </fieldset>
309         <fieldset class="action"><input type="submit" value="Update" /></fieldset>
310     </form>
311 <!-- /TMPL_IF -->
312
313 <!-- TMPL_IF name="delete_category" -->
314     <!-- TMPL_UNLESS name="MESSAGE8" -->
315     <div class="dialog message"> 
316     Confirm delete:
317     <form action="<!-- TMPL_VAR name="action" -->" method="post">
318         <input type="hidden" name="op" value="categorydelete_confirmed" />
319         <input type="hidden" name="categorycode" value="<!-- TMPL_VAR name="categorycode" escape="HTML" -->" />
320         <input type="submit" value="YES" />
321     </form>
322     <form action="<!-- TMPL_VAR name="action" -->" method="post"><input type="hidden" name="op" value="">
323         <input type="submit" value="NO" />
324     </form>
325     </div>
326     <!-- /TMPL_UNLESS -->
327 <!-- /TMPL_IF -->
328
329 </div>
330 </div>
331 <div class="yui-b">
332 <!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
333 </div>
334 </div>
335 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->