1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Administration › Libraries and groups
3 [% IF op == 'editcategory' %]
4 ›[% IF category.categorycode %]Edit group [% category.categorycode%][% ELSE %]New group[% END %]
5 [% ELSIF op == 'delete_confirm_category' %]
6 › Confirm deletion of group [% category.categorycode %]
7 [% ELSIF op == 'add_form' %]
8 ›[% IF library %]Modify library[% ELSE %]New library [% library.branchcode %][% END %]
9 [% ELSIF op == 'delete_confirm' %]
10 › Confirm deletion of library '[% library.branchcode %]'
13 [% INCLUDE 'doc-head-close.inc' %]
14 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
15 [% INCLUDE 'datatables.inc' %]
16 <script type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce.js"></script>
17 <script type="text/javascript">
19 $(document).ready(function() {
20 $("#branchest").dataTable($.extend(true, {}, dataTablesDefaults, {
22 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
25 "sPaginationType": "four_button"
29 $("#Aform").on("submit", function( event ) {
30 if ( $("#branchcode").val().match(/\s/) ) {
31 event.preventDefault();
32 alert(_("The library code entered contains whitespace characters. Please remove any whitespace characters from the library code"));
43 content_css : "[% themelang %]/css/tinymce.css",
44 plugins : "table,save,advhr,advlink,contextmenu",
45 theme_advanced_buttons1 : "save,|,bold,italic,|,cut,copy,paste,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,link,unlink,anchor,cleanup,help,code,advhr,",
46 theme_advanced_buttons2 : "tablecontrols,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,removeformat,|,visualaid,|,sub,sup,|,charmap",
47 // theme_advanced_buttons3 : "",
48 theme_advanced_toolbar_location : "top",
49 theme_advanced_toolbar_align : "left",
50 theme_advanced_path_location : "bottom",
51 theme_advanced_resizing : true,
52 apply_source_formatting : true
57 <body id="admin_branches" class="admin">
58 [% INCLUDE 'header.inc' %]
59 [% INCLUDE 'cat-search.inc' %]
61 <div id="breadcrumbs">
62 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
63 › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
64 › <a href="/cgi-bin/koha/admin/branches.pl">Libraries and groups</a>
65 [% IF op == 'add_form_category' %]
66 › [% IF category.categorycode %]Edit group [% category.categorycode %][% ELSE %]New group[% END %]
67 [% ELSIF op == 'delete_confirm_category' %]
68 › Confirm deletion of group [% category.categorycode %]
69 [% ELSIF op == 'add_form' %]
70 › [% IF library %]Modify library[% ELSE %]New library [% library.branchcode %][% END %]
71 [% ELSIF op == 'delete_confirm' %]
72 › Confirm deletion of library '[% library.branchcode %]'
76 <div id="doc3" class="yui-t2">
82 [% FOR m IN messages %]
83 <div class="dialog [% m.type %]">
85 [% CASE 'error_on_update' %]
86 An error occurred when updating this library. Perhaps it already exists.
87 [% CASE 'error_on_insert' %]
88 An error occurred when adding this library. The branchcode might already exist.
89 [% CASE 'error_on_delete' %]
90 An error occurred when deleting this library. Check the logs.
91 [% CASE 'success_on_update' %]
92 Library updated successfully.
93 [% CASE 'success_on_insert' %]
94 Library added successfully.
95 [% CASE 'success_on_delete' %]
96 Library deleted successfully.
97 [% CASE 'cannot_delete_library' %]
98 This library cannot be deleted. Patrons or items are still using it
99 [% IF m.data.patrons_count and m.data.items_count %]
100 ([% m.data.patrons_count %] patrons and [% m.data.items_count %] items).
101 [% ELSIF m.data.patrons_count %]
102 ([% m.data.patrons_count %] patrons).
103 [% ELSIF m.data.items_count %]
104 ([% m.data.items_count %] items).
106 [% CASE 'error_on_update_category' %]
107 An error occurred when updating this library category. Perhaps it already exists.
108 [% CASE 'error_on_insert_category' %]
109 An error occurred when adding this library category. The categorycode might already exist.
110 [% CASE 'error_on_delete_category' %]
111 An error occurred when deleting this library category. Check the logs.
112 [% CASE 'success_on_update_category' %]
113 Library category updated successfully.
114 [% CASE 'success_on_insert_category' %]
115 Library category added successfully.
116 [% CASE 'success_on_delete_category' %]
117 Library category deleted successfully.
118 [% CASE 'cannot_delete_category' %]
119 This library category cannot be deleted. [% m.data.libraries_count %] libraries are still using it.
126 [% IF op == 'list' %]
127 <div id="toolbar" class="btn-toolbar">
128 <a class="btn btn-small" id="newbranch" href="/cgi-bin/koha/admin/branches.pl?op=add_form"><i class="fa fa-plus"></i> New library</a>
129 <a class="btn btn-small" id="newcategory" href="/cgi-bin/koha/admin/branches.pl?op=add_form_category"><i class="fa fa-plus"></i> New group</a>
133 [% IF op == 'add_form' %]
134 <h3>[% IF library %]Modify library[% ELSE %]New library[% END %]</h3>
135 <form action="/cgi-bin/koha/admin/branches.pl" id="Aform" name="Aform" class="validated" method="post">
136 <fieldset class="rows">
137 <input type="hidden" name="op" value="add_validate" />
139 <input type="hidden" name="is_a_modif" value="1" />
144 <span class="label">Library code: </span>
145 <input type="hidden" name="branchcode" value="[% library.branchcode %]" />
146 [% library.branchcode %]
148 <label for="branchcode" class="required">Library code: </label>
149 <input type="text" name="branchcode" id="branchcode" size="10" maxlength="10" value="[% library.branchcode %]" class="required" required="required" />
150 <span class="required">Required</span>
154 <label for="branchname" class="required">Name: </label>
155 <input type="text" name="branchname" id="branchname" size="80" value="[% library.branchname %]" class="required" required="required" />
156 <span class="required">Required</span>
161 <fieldset class="rows"><legend>Group(s):</legend>
163 [% FOREACH category IN categories %]
165 <label for="[% category.categorycode %]">[% category.categoryname %]: </label>
166 [% IF category and selected_categorycodes.grep(category.categorycode).size %]
167 <input type="checkbox" id="[% category.categorycode %]" name="selected_categorycode_[% category.categorycode %]" checked="checked" />
169 <input type="checkbox" id="[% category.categorycode %]" name="selected_categorycode_[% category.categorycode %]" />
171 <span class="hint">[% category.codedescription %]</span>
177 <fieldset class="rows">
179 <li><label for="branchaddress1">Address line 1: </label><input type="text" name="branchaddress1" id="branchaddress1" size="60" value="[% library.branchaddress1 %]" /></li>
180 <li><label for="branchaddress2">Address line 2: </label><input type="text" name="branchaddress2" id="branchaddress2" size="60" value="[% library.branchaddress2 %]" /></li>
181 <li><label for="branchaddress3">Address line 3: </label><input type="text" name="branchaddress3" id="branchaddress3" size="60" value="[% library.branchaddress3 %]" /></li>
182 <li><label for="branchcity">City: </label><input type="text" name="branchcity" id="branchcity" size="60" value="[% library.branchcity %]" /></li>
183 <li><label for="branchstate">State: </label><input type="text" name="branchstate" id="branchstate" size="60" value="[% library.branchstate %]" /></li>
184 <li><label for="branchzip">ZIP/Postal code: </label><input type="text" name="branchzip" id="branchzip" size="25" maxlength="25" value="[% library.branchzip %]" /></li>
185 <li><label for="branchcountry">Country: </label><input type="text" name="branchcountry" id="branchcountry" size="60" value="[% library.branchcountry %]" /></li>
186 <li><label for="branchphone">Phone: </label><input type="text" name="branchphone" id="branchphone" size="60" value="[% library.branchphone %]" /></li>
187 <li><label for="branchfax">Fax: </label><input type="text" name="branchfax" id="branchfax" size="60" value="[% library.branchfax %]" /></li>
188 <li><label for="branchemail">Email: </label><input type="text" name="branchemail" id="branchemail" class="email" size="80" value="[% library.branchemail %]" /></li>
189 <li><label for="branchreplyto">Reply-To (if different to Email): </label> <input type="text" name="branchreplyto" id="branchreplyto" class="email" size="80" value="[% library.branchreplyto %]" /></li>
190 <li><label for="branchreturnpath">Return-Path (if different to Email): </label> <input type="text" name="branchreturnpath" id="branchreturnpath" class="email" size="80" value="[% library.branchreturnpath %]" /></li>
191 <li><label for="branchurl">URL: </label><input type="text" name="branchurl" id="branchurl" size="80" value="[% library.branchurl %]" class="url" /></li>
192 <li><label for="opac_info">OPAC info: </label><textarea name="opac_info" id="opac_info">[% library.opac_info.raw %]</textarea></li>
193 <li><label for="branchip">IP: </label><input type="text" name="branchip" id="branchip" size="15" maxlength="15" value="[% library.branchip %]" /> <span class="hint">Can be entered as a single IP, or a subnet such as 192.168.1.*</span></li>
194 <li><label for="branchnotes">Notes: </label><input type="text" name="branchnotes" id="branchnotes" size="80" value="[% library.branchnotes %]" /></li>
197 <fieldset class="action">
198 <input type="submit" value="Submit" />
199 <a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a>
204 [% IF op == 'delete_confirm' and not ( items_count or patrons_count )%]
205 <form action="/cgi-bin/koha/admin/branches.pl" method="post">
207 <legend>Confirm deletion of [% library.branchname %] ([% library.branchcode %])?</legend>
208 <input type="hidden" name="op" value="delete_confirmed" />
209 <input type="hidden" name="branchcode" value="[% library.branchcode %]" />
210 <input type="hidden" name="branchname" value="[% library.branchname %]">
211 <fieldset class="action">
212 <input type="submit" value="Delete Library" />
213 <a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a>
219 [% IF op == 'list' %]
222 <table id="branchest">
235 [% FOREACH library IN libraries %]
237 <td>[% library.branchname %]</td>
238 <td>[% library.branchcode %]</td>
240 [% IF library.branchaddress1 %]
241 [% library.branchaddress1 %][% END %]
242 [% IF library.branchaddress2 %]
243 <br />[% library.branchaddress2 %][% END %]
244 [% IF library.branchaddress3 %]
245 <br />[% library.branchaddress3 %][% END %]
246 [% IF library.branchcity %]
247 <br />[% library.branchcity %][% END %][% IF ( library.branchstate ) %],
248 [% library.branchstate %][% END %]
249 [% IF library.branchzip %]
250 [% library.branchzip %][% END %]
251 [% IF library.branchcountry %]
252 <br />[% library.branchcountry %][% END %]
253 [% IF library.branchphone %]
254 <br />Ph: [% library.branchphone %][% END %]
255 [% IF library.branchfax %]
256 <br />Fax: [% library.branchfax %][% END %]
257 [% IF library.branchemail %]
258 <br /><a href="mailto:[% library.branchemail %]">[% library.branchemail %]</a>[% END %]
259 [% IF library.branchurl %]
260 <br /><a href="[% library.branchurl %]">[% library.branchurl %]</a>[% END %]
261 [% IF library.opac_info %]
262 <br />OPAC Info: <div>[% library.opac_info.raw %]</div>[% END %]
263 [% IF library.branchnotes %]
264 <br />Notes: [% library.branchnotes %][% END %]
267 [% FOREACH category IN library.get_categories %]
268 [% category.categoryname %]<br />
271 <td>[% library.branchip %]</td>
273 <a href="/cgi-bin/koha/admin/branches.pl?op=add_form&branchcode=[% library.branchcode %]">Edit</a>
276 <a href="/cgi-bin/koha/admin/branches.pl?op=delete_confirm&branchcode=[% library.branchcode %]">Delete</a>
283 <div class="dialog message">There are no libraries defined. <a href="/cgi-bin/koha/admin/branches.pl?op=add_form">Start defining libraries</a>.</div>
287 [% FOREACH group_type IN group_types %]
288 <h3>[% IF group_type.categorytype == 'properties' %]Properties[% ELSIF group_type.categorytype == 'searchdomain' %]Search domain[% END %]</h3>
289 [% IF group_type.categories %]
301 [% FOREACH category IN group_type.categories %]
303 <td>[% category.categoryname %]</td>
304 <td>[% category.categorycode %]</td>
305 <td>[% category.codedescription %]</td>
307 <a href="/cgi-bin/koha/admin/branches.pl?categorycode=[% category.categorycode %]&op=add_form_category">Edit</a>
310 <a href="/cgi-bin/koha/admin/branches.pl?categorycode=[% category.categorycode %]&op=delete_confirm_category">Delete</a>
317 [% IF group_type.categorytype == 'properties' %]
318 No properties defined.
319 [% ELSIF group_type.categorytype == 'searchdomain' %]
320 No search domain defined.
322 <a href="/cgi-bin/koha/admin/branches.pl?op=add_form_category">Add a new group</a>.
326 <p>No groups defined.</p>
330 [% IF op == 'add_form_category' %]
331 <h3>[% IF category.categorycode %]Edit group [% category.categorycode %][% ELSE %]Add group[% END %]</h3>
332 <form action="/cgi-bin/koha/admin/branches.pl" name="Aform" method="post">
333 <input type="hidden" name="op" value="add_validate_category" />
334 [% IF category.categorycode %]
335 <input type="hidden" name="is_a_modif" value="1" />
337 <fieldset class="rows">
340 [% IF category.categorycode %]
341 <span class="label">Category code: </span>
342 <input type="hidden" name="categorycode" id="categorycode" value="[% category.categorycode %]" />
343 [% category.categorycode %]
345 <label for="categorycode">Category code:</label>
346 <input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" />
350 <label for="categoryname">Name: </label>
351 <input type="text" name="categoryname" id="categoryname" size="32" maxlength="32" value="[% category.categoryname %]" />
354 <label for="codedescription">Description: </label>
355 <input type="text" name="codedescription" id="codedescription" size="70" value="[% category.codedescription %]" />
358 <label for="categorytype">Category type: </label>
359 <select id="categorytype" name="categorytype">
360 [% IF category.categorytype == 'properties' %]
361 <option value="searchdomain">Search domain</option>
362 <option value="properties" selected="selected">Properties</option>
364 <option value="searchdomain">Search domain</option>
365 <option value="properties">Properties</option>
370 <label for="show_in_pulldown">Show in search pulldown: </label>
371 [% IF category.show_in_pulldown %]
372 <input type="checkbox" name="show_in_pulldown" id="show_in_pulldown" checked="checked"/>
374 <input type="checkbox" name="show_in_pulldown" id="show_in_pulldown" />
379 <fieldset class="action"><input type="submit" value="Update" /></fieldset>
383 [% IF op == 'delete_confirm_category' %]
384 <div class="dialog message">
385 Are you sure you want to delete the group '[% category.codedescription %]' ([% category.categorycode %])?
386 <form action="/cgi-bin/koha/admin/branches.pl" method="post">
387 <input type="hidden" name="op" value="delete_confirmed_category" />
388 <input type="hidden" name="categorycode" value="[% category.categorycode %]" />
389 <input type="submit" value="Delete" />
390 <a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a>
398 [% INCLUDE 'admin-menu.inc' %]
401 [% INCLUDE 'intranet-bottom.inc' %]