2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha › Administration › Libraries and groups
4 [% IF op == 'editcategory' %]
5 › [% IF category.categorycode %] Edit group [% category.categorycode%] [% ELSE %] New group [% END %]
6 [% ELSIF op == 'delete_confirm_category' %]
7 › Confirm deletion of group [% category.categorycode %]
8 [% ELSIF op == 'add_form' %]
9 › [% IF library %] Modify library [% library.branchcode | html %] [% ELSE %] New library [% END %]
10 [% ELSIF op == 'delete_confirm' %]
11 › Confirm deletion of library '[% library.branchcode | html %]'
14 [% INCLUDE 'doc-head-close.inc' %]
15 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
18 <body id="admin_branches" class="admin">
19 [% INCLUDE 'header.inc' %]
20 [% INCLUDE 'prefs-admin-search.inc' %]
22 <div id="breadcrumbs">
23 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
24 › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
25 › <a href="/cgi-bin/koha/admin/branches.pl">Libraries and groups</a>
26 [% IF op == 'add_form_category' %]
27 › [% IF category.categorycode %] Edit group [% category.categorycode %] [% ELSE %] New group [% END %]
28 [% ELSIF op == 'delete_confirm_category' %]
29 › Confirm deletion of group [% category.categorycode %]
30 [% ELSIF op == 'add_form' %]
31 › [% IF library %] Modify library [% library.branchcode | html %] [% ELSE %] New library [% END %]
32 [% ELSIF op == 'delete_confirm' %]
33 › Confirm deletion of library '[% library.branchcode | html %]'
37 <div id="doc3" class="yui-t2">
43 [% FOREACH m IN messages %]
44 <div class="dialog [% m.type %]">
46 [% CASE 'error_on_update' %]
47 An error occurred when updating this library. Perhaps it already exists.
48 [% CASE 'error_on_insert' %]
49 An error occurred when adding this library. The branchcode might already exist.
50 [% CASE 'error_on_delete' %]
51 An error occurred when deleting this library. Check the logs.
52 [% CASE 'success_on_update' %]
53 Library updated successfully.
54 [% CASE 'success_on_insert' %]
55 Library added successfully.
56 [% CASE 'success_on_delete' %]
57 Library deleted successfully.
58 [% CASE 'cannot_delete_library' %]
59 This library cannot be deleted. Patrons or items are still using it
60 [% IF m.data.patrons_count and m.data.items_count %]
61 ([% m.data.patrons_count %] patrons and [% m.data.items_count %] items).
62 [% ELSIF m.data.patrons_count %]
63 ([% m.data.patrons_count %] patrons).
64 [% ELSIF m.data.items_count %]
65 ([% m.data.items_count %] items).
67 [% CASE 'error_on_update_category' %]
68 An error occurred when updating this library category. Perhaps it already exists.
69 [% CASE 'error_on_insert_category' %]
70 An error occurred when adding this library category. The categorycode might already exist.
71 [% CASE 'error_on_delete_category' %]
72 An error occurred when deleting this library category. Check the logs.
73 [% CASE 'success_on_update_category' %]
74 Library category updated successfully.
75 [% CASE 'success_on_insert_category' %]
76 Library category added successfully.
77 [% CASE 'success_on_delete_category' %]
78 Library category deleted successfully.
79 [% CASE 'cannot_delete_category' %]
80 This library category cannot be deleted. [% m.data.libraries_count %] libraries are still using it.
88 <div id="toolbar" class="btn-toolbar">
89 <a class="btn btn-default btn-sm" id="newbranch" href="/cgi-bin/koha/admin/branches.pl?op=add_form"><i class="fa fa-plus"></i> New library</a>
90 <a class="btn btn-default btn-sm" id="newcategory" href="/cgi-bin/koha/admin/branches.pl?op=add_form_category"><i class="fa fa-plus"></i> New group</a>
94 [% IF op == 'add_form' %]
95 <h3>[% IF library %]Modify library[% ELSE %]New library[% END %]</h3>
96 <form action="/cgi-bin/koha/admin/branches.pl" id="Aform" name="Aform" class="validated" method="post">
97 <fieldset class="rows">
98 <input type="hidden" name="op" value="add_validate" />
100 <input type="hidden" name="is_a_modif" value="1" />
105 <span class="label">Library code: </span>
106 <input type="hidden" name="branchcode" value="[% library.branchcode |html %]" />
107 [% library.branchcode | html %]
109 <label for="branchcode" class="required">Library code: </label>
110 <input type="text" name="branchcode" id="branchcode" size="10" maxlength="10" value="[% library.branchcode |html %]" class="required" required="required" />
111 <span class="required">Required</span>
115 <label for="branchname" class="required">Name: </label>
116 <input type="text" name="branchname" id="branchname" size="80" value="[% library.branchname |html %]" class="required" required="required" />
117 <span class="required">Required</span>
122 <fieldset class="rows"><legend>Group(s):</legend>
124 [% FOREACH category IN categories %]
126 <label for="[% category.categorycode %]">[% category.categoryname |html %]: </label>
127 [% IF category and selected_categorycodes.grep(category.categorycode).size %]
128 <input type="checkbox" id="[% category.categorycode %]" name="selected_categorycode_[% category.categorycode %]" checked="checked" />
130 <input type="checkbox" id="[% category.categorycode %]" name="selected_categorycode_[% category.categorycode %]" />
132 <span class="hint">[% category.codedescription |html %]</span>
138 <fieldset class="rows">
140 <li><label for="branchaddress1">Address line 1: </label><input type="text" name="branchaddress1" id="branchaddress1" size="60" value="[% library.branchaddress1 |html %]" /></li>
141 <li><label for="branchaddress2">Address line 2: </label><input type="text" name="branchaddress2" id="branchaddress2" size="60" value="[% library.branchaddress2 |html %]" /></li>
142 <li><label for="branchaddress3">Address line 3: </label><input type="text" name="branchaddress3" id="branchaddress3" size="60" value="[% library.branchaddress3 |html %]" /></li>
143 <li><label for="branchcity">City: </label><input type="text" name="branchcity" id="branchcity" size="60" value="[% library.branchcity |html %]" /></li>
144 <li><label for="branchstate">State: </label><input type="text" name="branchstate" id="branchstate" size="60" value="[% library.branchstate |html %]" /></li>
145 <li><label for="branchzip">ZIP/Postal code: </label><input type="text" name="branchzip" id="branchzip" size="25" maxlength="25" value="[% library.branchzip |html %]" /></li>
146 <li><label for="branchcountry">Country: </label><input type="text" name="branchcountry" id="branchcountry" size="60" value="[% library.branchcountry |html %]" /></li>
147 <li><label for="branchphone">Phone: </label><input type="text" name="branchphone" id="branchphone" size="60" value="[% library.branchphone |html %]" /></li>
148 <li><label for="branchfax">Fax: </label><input type="text" name="branchfax" id="branchfax" size="60" value="[% library.branchfax |html %]" /></li>
149 <li><label for="branchemail">Email: </label><input type="text" name="branchemail" id="branchemail" class="email" size="80" value="[% library.branchemail |html %]" /></li>
150 <li><label for="branchreplyto">Reply-To: </label> <input type="text" name="branchreplyto" id="branchreplyto" class="email" size="80" value="[% library.branchreplyto |html %]" /><br /><span class="hint">Default: ReplyToDefault system preference</span></li>
151 <li><label for="branchreturnpath">Return-Path: </label> <input type="text" name="branchreturnpath" id="branchreturnpath" class="email" size="80" value="[% library.branchreturnpath |html %]" /><br /><span class="hint">Default: ReturnpathDefault system preference</span></li>
152 <li><label for="branchurl">URL: </label><input type="text" name="branchurl" id="branchurl" size="80" value="[% library.branchurl |html %]" class="url" /></li>
153 <li><label for="opac_info">OPAC info: </label><textarea name="opac_info" id="opac_info">[% library.opac_info |html %]</textarea></li>
154 <li><label for="branchip">IP: </label><input type="text" name="branchip" id="branchip" size="15" maxlength="15" value="[% library.branchip |html %]" /> <span class="hint">Can be entered as a single IP, or a subnet such as 192.168.1.*</span></li>
155 <li><label for="marcorgccode">MARC organization code</label> <input type="text" name="marcorgcode" id="marcorgcode" size="16" value="[% library.marcorgcode |html %]" /> <span class="hint">If not filled in defaults to system preference MARCOrgCode. You can obtain your code from <a href="http://www.loc.gov/marc/organizations/orgshome.html" target="_blank">Library of Congress</a>.</span>
156 <li><label for="branchnotes">Notes: </label><input type="text" name="branchnotes" id="branchnotes" size="80" value="[% library.branchnotes |html %]" /></li>
159 <fieldset class="action">
160 <input type="submit" value="Submit" />
161 <a class="cancel" href="/cgi-bin/koha/admin/branches.pl">Cancel</a>
166 [% IF op == 'delete_confirm' and not ( items_count or patrons_count )%]
167 <div class="dialog alert">
168 <form action="/cgi-bin/koha/admin/branches.pl" method="post">
169 <h3>Are you sure you want to delete [% library.branchname |html %] ([% library.branchcode | html %])?</h3>
170 <input type="hidden" name="op" value="delete_confirmed" />
171 <input type="hidden" name="branchcode" value="[% library.branchcode |html %]" />
172 <input type="hidden" name="branchname" value="[% library.branchname |html %]">
173 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
175 <form action="/cgi-bin/koha/admin/branches.pl" method="get">
176 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
181 [% IF op == 'list' %]
183 [% IF libraries.count %]
184 <table id="branchest">
191 <th>MARC organization code</th>
197 [% FOREACH library IN libraries %]
199 <td>[% library.branchname |html %]</td>
200 <td>[% library.branchcode |html %]</td>
202 [% IF library.branchaddress1 %]
203 [% library.branchaddress1 |html %][% END %]
204 [% IF library.branchaddress2 %]
205 <br />[% library.branchaddress2 |html %][% END %]
206 [% IF library.branchaddress3 %]
207 <br />[% library.branchaddress3 |html %][% END %]
208 [% IF library.branchcity %]
209 <br />[% library.branchcity |html %][% END %][% IF ( library.branchstate ) %],
210 [% library.branchstate |html %][% END %]
211 [% IF library.branchzip %]
212 [% library.branchzip |html %][% END %]
213 [% IF library.branchcountry %]
214 <br />[% library.branchcountry |html %][% END %]
215 [% IF library.branchphone %]
216 <br />Ph: [% library.branchphone |html %][% END %]
217 [% IF library.branchfax %]
218 <br />Fax: [% library.branchfax |html %][% END %]
219 [% IF library.branchemail %]
220 <br /><a href="mailto:[% library.branchemail %]">[% library.branchemail |html %]</a>[% END %]
221 [% IF library.branchurl %]
222 <br /><a href="[% library.branchurl %]">[% library.branchurl |html %]</a>[% END %]
223 [% IF library.opac_info %]
224 <br />OPAC Info: <div>[% library.opac_info %]</div>[% END %]
225 [% IF library.branchnotes %]
226 <br />Notes: [% library.branchnotes |html %][% END %]
229 [% FOREACH category IN library.get_categories %]
230 [% category.categoryname |html %]<br />
233 <td>[% library.marcorgcode %]</td>
234 <td>[% library.branchip %]</td>
236 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/branches.pl?op=add_form&branchcode=[% library.branchcode |uri %]"><i class="fa fa-pencil"></i> Edit</a>
237 <form action="/cgi-bin/koha/admin/branches.pl" method="post">
238 <input type="hidden" name="branchcode" value="[% library.branchcode |html %]" />
239 <input type="hidden" name="op" value="delete_confirm" />
240 <button type="submit" id="delete_library_[% library.branchcode | html %]" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</button>
248 <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>
252 [% FOREACH group_type IN group_types %]
253 <h3>[% IF group_type.categorytype == 'properties' %]Properties[% ELSIF group_type.categorytype == 'searchdomain' %]Search domain[% END %]</h3>
254 [% IF group_type.categories.size %]
265 [% FOREACH category IN group_type.categories %]
267 <td>[% category.categoryname |html %]</td>
268 <td>[% category.categorycode %]</td>
269 <td>[% category.codedescription |html %]</td>
271 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/branches.pl?categorycode=[% category.categorycode %]&op=add_form_category"><i class="fa fa-pencil"></i> Edit</a>
272 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/branches.pl?categorycode=[% category.categorycode %]&op=delete_confirm_category"><i class="fa fa-trash"></i> Delete</a>
279 [% IF group_type.categorytype == 'properties' %]
280 No properties defined.
281 [% ELSIF group_type.categorytype == 'searchdomain' %]
282 No search domain defined.
284 <a href="/cgi-bin/koha/admin/branches.pl?op=add_form_category">Add a new group</a>.
288 <p>No groups defined.</p>
292 [% IF op == 'add_form_category' %]
293 <h3>[% IF category.categorycode %]Edit group [% category.categorycode %][% ELSE %]Add group[% END %]</h3>
294 <form action="/cgi-bin/koha/admin/branches.pl" name="Aform" method="post" class="validated">
295 <input type="hidden" name="op" value="add_validate_category" />
296 [% IF category.categorycode %]
297 <input type="hidden" name="is_a_modif" value="1" />
299 <fieldset class="rows">
302 [% IF category.categorycode %]
303 <span class="label">Category code: </span>
304 <input type="hidden" name="categorycode" id="categorycode" value="[% category.categorycode |html %]" />
305 [% category.categorycode %]
307 <label for="categorycode" class="required">Category code:</label>
308 <input type="text" name="categorycode" id="categorycode" size="10" maxlength="10" class="required" required="required" />
309 <span class="required">Required</span>
313 <label for="categoryname" class="required">Name: </label>
314 <input type="text" name="categoryname" id="categoryname" size="32" maxlength="32" value="[% category.categoryname |html %]" class="required" required="required" />
315 <span class="required">Required</span>
318 <label for="codedescription">Description: </label>
319 <input type="text" name="codedescription" id="codedescription" size="70" value="[% category.codedescription |html %]" />
322 <label for="categorytype">Category type: </label>
323 <select id="categorytype" name="categorytype">
324 [% IF category.categorytype == 'properties' %]
325 <option value="searchdomain">Search domain</option>
326 <option value="properties" selected="selected">Properties</option>
328 <option value="searchdomain">Search domain</option>
329 <option value="properties">Properties</option>
335 <label for="show_in_pulldown">Show in search pulldown: </label>
336 [% IF category.show_in_pulldown %]
337 <input type="checkbox" name="show_in_pulldown" id="show_in_pulldown" checked="checked"/>
339 <input type="checkbox" name="show_in_pulldown" id="show_in_pulldown" />
344 <fieldset class="action">
345 <input type="submit" value="Submit" />
346 <a href="/cgi-bin/koha/admin/branches.pl" class="cancel">Cancel</a>
351 [% IF op == 'delete_confirm_category' %]
352 <div class="dialog alert">
353 <h3>Are you sure you want to delete the group '[% category.codedescription |html %]' ([% category.categorycode %])?</h3>
354 <form action="/cgi-bin/koha/admin/branches.pl" method="post">
355 <input type="hidden" name="op" value="delete_confirmed_category" />
356 <input type="hidden" name="categorycode" value="[% category.categorycode |html %]" />
357 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
359 <form action="/cgi-bin/koha/admin/branches.pl" method="get">
360 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
368 [% INCLUDE 'admin-menu.inc' %]
372 [% MACRO jsinclude BLOCK %]
373 <script type="text/javascript" src="[% interface %]/[% theme %]/js/admin-menu.js"></script>
374 [% INCLUDE 'datatables.inc' %]
375 <script type="text/javascript" src="[% interface %]/lib/tiny_mce/tiny_mce.js"></script>
376 <script type="text/javascript">
377 $(document).ready(function() {
378 $("#branchest").dataTable($.extend(true, {}, dataTablesDefaults, {
380 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
382 "iDisplayLength": 10,
383 "sPaginationType": "four_button"
387 $("#Aform").on("submit", function( event ) {
388 if ( $("#branchcode").val().match(/\s/) ) {
389 event.preventDefault();
390 alert(_("The library code entered contains whitespace characters. Please remove any whitespace characters from the library code"));
401 content_css : "[% interface %]/[% theme %]/css/tinymce.css",
402 plugins : "table,save,advhr,advlink,contextmenu",
403 theme_advanced_buttons1 : "save,|,bold,italic,|,cut,copy,paste,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,|,link,unlink,anchor,cleanup,help,code,advhr,",
404 theme_advanced_buttons2 : "tablecontrols,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,removeformat,|,visualaid,|,sub,sup,|,charmap",
405 // theme_advanced_buttons3 : "",
406 theme_advanced_toolbar_location : "top",
407 theme_advanced_toolbar_align : "left",
408 theme_advanced_path_location : "bottom",
409 theme_advanced_resizing : true,
410 apply_source_formatting : true
415 [% INCLUDE 'intranet-bottom.inc' %]