1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Administration › Authorized values
3 [% IF op == 'add_form' %]
4 [% IF ( action_modify ) %] › Modify authorized value[% END %]
5 [% IF ( action_add_value ) %] › New authorized value[% END %]
6 [% IF ( action_add_category ) %] › New category[% END %]
9 [% INCLUDE 'doc-head-close.inc' %]
11 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
12 [% INCLUDE 'datatables.inc' %]
13 <script type="text/javascript">
15 $(document).ready(function() {
16 $("#table_authorized_values").dataTable($.extend(true, {}, dataTablesDefaults, {
18 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
20 "aaSorting": [[ 1, "asc" ]],
21 "sPaginationType": "four_button"
24 if ( $("#branches option:selected").length < 1 ) {
25 $("#branches option:first").attr("selected", "selected");
29 $("a.delete").click(function(){
30 return confirm(_("Are you sure you want to delete this authorized value?"));
37 <script type="text/javascript">
39 $(document).ready(function() {
40 $('#category').find("input:submit").hide();
41 $('#searchfield').change(function() {
42 $('#category').submit();
49 <style type="text/css">
50 fieldset.rows div.toptabs li { clear:none;margin-right:.5em;padding-bottom:0;width:auto; }
51 fieldset.rows div.toptabs .ui-tabs-nav li.ui-tabs-active {background-color : #F4F8F9; }
52 fieldset.rows .ui-tabs-panel { margin-right : 10px; margin-left : 10px;margin-bottom:10px;}
53 fieldset.rows .ui-tabs-nav { margin-left : 10px; }
56 <body id="admin_authorised_values" class="admin">
57 [% INCLUDE 'header.inc' %]
58 [% INCLUDE 'prefs-admin-search.inc' %]
59 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › [% IF op == 'add_form' %] <a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized values</a> › [% IF ( action_modify ) %]Modify authorized value[% END %]
60 [% IF ( action_add_value ) %]New authorized value[% END %]
61 [% IF ( action_add_category ) %]New category[% END %][% END %]
62 [% IF op == 'list' %]Authorized values[% END %]</div>
64 <div id="doc3" class="yui-t2">
70 [% IF op == 'add_form' %]
72 [% IF ( action_modify ) %]Modify authorized value[% END %]
73 [% IF ( action_add_value ) %]New authorized value[% END %]
74 [% IF ( action_add_category ) %]New category[% END %]
77 [% IF ( action_modify ) %]<div class="note"><i class="fa fa-exclamation"></i> <strong>NOTE:</strong> If you change an authorized value code, existing records using it won't be updated. Changes to value descriptions will show immediately.</div>[% END %]
79 <form action="/cgi-bin/koha/admin/authorised_values.pl" name="Aform" method="post" class="validated">
80 <fieldset class="rows"><ol>
81 [% IF action_add_category %]
83 <label for="category" class="required">Category: </label>
84 <input type="text" name="category" id="category" size="32" maxlength="32" class="focus required" />
85 <span class="required">Required</span>
86 <input type="hidden" name="op" value="add_category" />
90 <span class="label">Category</span>
91 <input type="hidden" name="op" value="add" />
92 <input type="hidden" name="category" value="[% category | html %]" /> [% category | html %]
95 <label for="authorised_value">Authorized value: </label>
96 [% IF ( action_modify ) %]<input type="hidden" id="id" name="id" value="[% id %]" />[% END %]
97 <input type="text" id="authorised_value" name="authorised_value" value="[% authorised_value | html %]" maxlength="80" class="focus" />
100 <label for="lib">Description: </label>
101 <input type="text" name="lib" id="lib" value="[% lib %]" maxlength="200" />
104 <label for="lib_opac">Description (OPAC): </label>
105 <input type="text" name="lib_opac" id="lib_opac" value="[% lib_opac %]" maxlength="200" />
107 <li><label for="branches">Libraries limitation: </label>
108 <select id="branches" name="branches" multiple size="10">
109 <option value="">All libraries</option>
110 [% FOREACH branch IN branches_loop %]
111 [% IF ( branch.selected ) %]
112 <option selected="selected" value="[% branch.branchcode %]">[% branch.branchname |html %]</option>
114 <option value="[% branch.branchcode %]">[% branch.branchname |html %]</option>
118 <span>Select 'All libraries' if this authorized value must be displayed all the time. Otherwise select libraries you want to associate with this value.</span>
122 <div id="icons" class="toptabs" style="clear:both">
123 <h5 style="margin-left:10px;">Choose an icon:</h5>
125 <li><a href="#none">None</a></li>
126 [% FOREACH imageset IN imagesets %]
127 [% IF ( imageset.imagesetactive ) %]<li class="ui-tabs-active">[% ELSE %]<li>[% END %]<a href="#[% imageset.imagesetname %]">[% imageset.imagesetname %]</a></li>
131 <li><label for="noimage">No image: </label><input type="radio" name="imageurl" id="noimage" value="removeImage" /></li>
133 <br class="clear" /></div>
134 [% FOREACH imageset IN imagesets %]
135 <div id="[% imageset.imagesetname %]"><ul>
136 [% FOREACH image IN imageset.images %]
137 <li style="float: none; display: inline-block; clear : none; width: auto;">
138 <label> [% IF ( image.StaffImageUrl ) %]
139 <img src="[% image.StaffImageUrl %]" alt="[% image.StaffImageUrl %]" title="[% image.StaffImageUrl %]" />
142 [% IF ( image.checked ) %]
143 <input type="radio" name="imageurl" value="[% image.KohaImage %]" checked="checked" />
145 [% IF ( image.KohaImage ) %] <!-- to delete the radio button if there is no image after -->
146 <input type="radio" name="imageurl" value="[% image.KohaImage %]" />
158 <fieldset class="action"> <input type="hidden" name="id" value="[% id %]" />
159 <input type="submit" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=[% category | url %]">Cancel</a></fieldset>
164 [% IF op == 'list' %]
166 <div id="toolbar" class="btn-toolbar">
167 <a id="addauth" class="btn btn-default btn-sm" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form&category=[% category | url %]"><i class="fa fa-plus"> </i> New authorized value for [% category |html %]</a>
168 <a id="addcat" class="btn btn-default btn-sm" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form"><i class="fa fa-plus"> </i> New category</a>
171 <h1>Authorized values</h1>
172 <div class="note"><i class="fa fa-exclamation"></i> <strong>NOTE:</strong> If you change an authorized value code, existing records using it won't be updated. Changes to value descriptions will show immediately.</div>
174 [% FOR m IN messages %]
175 <div class="dialog [% m.type %]">
177 [% CASE 'error_on_update' %]
178 An error occurred when updating this authorized value. Perhaps the value already exists.
179 [% CASE 'error_on_insert' %]
180 An error occurred when inserting this authorized value. Perhaps the value or the category already exists.
181 [% CASE 'error_on_insert_cat' %]
182 An error occurred when inserting this authorized value category. Perhaps the category name already exists.
183 [% CASE 'error_on_delete' %]
184 An error occurred when deleting this authorized value. Check the logs.
185 [% CASE 'success_on_update' %]
186 Authorized value updated successfully.
187 [% CASE 'success_on_insert' %]
188 Authorized value added successfully.
189 [% CASE 'success_on_insert_cat' %]
190 Authorized value category added successfully.
191 [% CASE 'success_on_delete' %]
192 Authorized value deleted successfully.
193 [% CASE 'already_exists' %]
194 This authorized value already exists.
195 [% CASE 'cat_already_exists' %]
196 This authorized value category already exists.
197 [% CASE 'invalid_category_name' %]
198 The authorized value category 'branches', 'itemtypes' and 'cn_source' are used internally by Koha and are not valid.
205 <form action="/cgi-bin/koha/admin/authorised_values.pl" method="post" id="category">
206 <label for="searchfield">Show category: </label>
207 <select name="searchfield" id="searchfield" size="1">
208 [% FOR c IN categories %]
209 [% IF c == searchfield %]
210 <option value="[% c %]" selected="selected">[% c |html %]</option>
212 <option value="[% c %]">[% c |html %]</option>
215 <input type="submit" value="Submit" />
217 [% IF ( category == 'Bsort1' ) %]
218 <p>An authorized value attached to patrons, that can be used for stats purposes</p>
220 [% IF ( category == 'Bsort2' ) %]
221 <p>An authorized value attached to patrons, that can be used for stats purposes</p>
223 [% IF ( category == 'Asort1' ) %]
224 <p>An authorized value attached to acquisitions, that can be used for stats purposes</p>
226 [% IF ( category == 'Asort2' ) %]
227 <p>An authorized value attached to acquisitions, that can be used for stats purposes</p>
229 [% IF ( category == 'SUGGEST' ) %]
230 <p>Reasons to reject or accept patron suggestions</p>
232 [% IF ( category == 'DAMAGED' ) %]
233 <p>Statuses to describe a damaged item</p>
235 [% IF ( category == 'LOST' ) %]
236 <p>Statuses to describe a lost item</p>
238 [% IF ( category == 'MANUAL_INV' ) %]
239 <p>Additional values for manual invoice types</p>
241 [% IF ( category == 'BOR_NOTES' ) %]
242 <p>Values for custom patron notes</p>
244 [% IF ( category == 'LOC' ) %]
245 <p>Values for shelving locations</p>
247 [% IF ( category == 'CCODE' ) %]
248 <p>Values for collection codes</p>
250 [% IF ( category == 'NOT_LOAN' ) %]
251 <p>Statuses to describe why an item is not for loan</p>
253 <h3>Authorized values for category [% category |html %]:</h3>
255 [% IF ( loop ) %]<div id="pagertable_authorized_values">
258 [% IF ( loop ) %]<table id="table_authorized_values">
260 <th>Authorized value</th>
262 <th>Description (OPAC)</th>
264 <th>Branches limitations</th>
268 [% FOREACH loo IN loop %]
269 [% UNLESS ( loop.odd ) %]
274 <td>[% loo.authorised_value | html %]</td>
275 <td>[% loo.lib |html %]</td>
276 <td>[% loo.lib_opac |html %]</td>
277 <td>[% IF ( loo.imageurl ) %]<img src="[% loo.imageurl %]" alt=""/>[% ELSE %] [% END %]</td>
279 [% IF loo.branches.size > 0 %]
280 [% branches_str = "" %]
281 [% FOREACH branch IN loo.branches %]
282 [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %]
284 <span href="#" title="[% branches_str %]">
285 [% IF loo.branches.size > 1 %]
286 [% loo.branches.size %] branches limitations
288 [% loo.branches.size %] branch limitation
294 <td class="actions"><a href="/cgi-bin/koha/admin/authorised_values.pl?op=add_form&id=[% loo.id %]" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
295 <a class="delete btn btn-default btn-xs" href="/cgi-bin/koha/admin/authorised_values.pl?op=delete&searchfield=[% searchfield | url %]&id=[% loo.id %]"><i class="fa fa-trash"></i> Delete</a></td>
298 </tbody></table>[% ELSE %]
299 <div class="dialog message">There are no authorized values defined for [% category |html %]</div>
302 [% IF ( isprevpage ) %]
303 <form class="inline" action="/cgi-bin/koha/admin/authorised_values.pl" method="post">
304 <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
305 <input type="submit" value="<< Previous" /></form>
313 [% INCLUDE 'admin-menu.inc' %]
316 [% INCLUDE 'intranet-bottom.inc' %]