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="[% themelang %]/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 'cat-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"><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">
80 <input type="hidden" name="op" value="add" />
81 <fieldset class="rows"><ol>
83 [% IF ( action_add_category ) %]<label for="category">Category: </label>
84 <input type="text" name="category" id="category" size="32" maxlength="32" class="focus" />
85 [% ELSE %]<span class="label">Category</span>
86 <input type="hidden" name="category" value="[% category %]" /> [% category %]
90 <label for="authorised_value">Authorized value: </label>
91 [% IF ( action_modify ) %]<input type="hidden" id="id" name="id" value="[% id %]" />[% END %]
92 [% IF ( action_add_category ) %]
93 <input type="text" id="authorised_value" name="authorised_value" value="[% authorised_value %]" maxlength="80" />
95 <input type="text" id="authorised_value" name="authorised_value" value="[% authorised_value %]" maxlength="80" class="focus" />
99 <label for="lib">Description: </label>
100 <input type="text" name="lib" id="lib" value="[% lib %]" maxlength="200" />
103 <label for="lib_opac">Description (OPAC): </label>
104 <input type="text" name="lib_opac" id="lib_opac" value="[% lib_opac %]" maxlength="200" />
106 <li><label for="branches">Libraries limitation: </label>
107 <select id="branches" name="branches" multiple size="10">
108 <option value="">All libraries</option>
109 [% FOREACH branch IN branches_loop %]
110 [% IF ( branch.selected ) %]
111 <option selected="selected" value="[% branch.branchcode %]">[% branch.branchname %]</option>
113 <option value="[% branch.branchcode %]">[% branch.branchname %]</option>
117 <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>
121 <div id="icons" class="toptabs" style="clear:both">
122 <h5 style="margin-left:10px;">Choose an icon:</h5>
124 <li><a href="#none">None</a></li>
125 [% FOREACH imageset IN imagesets %]
126 [% IF ( imageset.imagesetactive ) %]<li class="ui-tabs-active">[% ELSE %]<li>[% END %]<a href="#[% imageset.imagesetname %]">[% imageset.imagesetname %]</a></li>
130 <li><label for="noimage">No image: </label><input type="radio" name="imageurl" id="noimage" value="removeImage" /></li>
132 <br class="clear" /></div>
133 [% FOREACH imageset IN imagesets %]
134 <div id="[% imageset.imagesetname %]"><ul>
135 [% FOREACH image IN imageset.images %]
136 <li style="float: none; display: inline-block; clear : none; width: auto;">
137 <label> [% IF ( image.StaffImageUrl ) %]
138 <img src="[% image.StaffImageUrl %]" alt="[% image.StaffImageUrl %]" title="[% image.StaffImageUrl %]" />
141 [% IF ( image.checked ) %]
142 <input type="radio" name="imageurl" value="[% image.KohaImage %]" checked="checked" />
144 [% IF ( image.KohaImage ) %] <!-- to delete the radio button if there is no image after -->
145 <input type="radio" name="imageurl" value="[% image.KohaImage %]" />
156 <fieldset class="action"> <input type="hidden" name="id" value="[% id %]" />
157 <input type="submit" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=[% category %]">Cancel</a></fieldset>
162 [% IF op == 'list' %]
164 <div id="toolbar" class="btn-toolbar">
165 <a id="addauth" class="btn btn-small" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form&category=[% category %]"><i class="icon-plus"> </i> New authorized value for [% category %]</a>
166 <a id="addcat" class="btn btn-small" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form"><i class="icon-plus"> </i> New category</a>
169 <h1>Authorized values</h1>
170 <div class="note"><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>
172 [% FOR m IN messages %]
173 <div class="dialog [% m.type %]">
175 [% CASE 'error_on_update' %]
176 An error occurred when updating this authorized value. Perhaps the value already exists.
177 [% CASE 'error_on_insert' %]
178 An error occurred when inserting this authorized value. Perhaps the value or the category already exists.
179 [% CASE 'error_on_delete' %]
180 An error occurred when deleting this authorized value. Check the logs.
181 [% CASE 'success_on_update' %]
182 Authorized value updated successfully.
183 [% CASE 'success_on_insert' %]
184 Authorized value inserted successfully.
185 [% CASE 'success_on_delete' %]
186 Authorized value deleted successfully.
187 [% CASE 'already_exists' %]
188 This authorized value already exists.
195 <form action="/cgi-bin/koha/admin/authorised_values.pl" method="post" id="category">
196 <label for="searchfield">Show category: </label>
197 <select name="searchfield" id="searchfield" size="1">
198 [% FOR c IN categories %]
199 [% IF c == searchfield %]
200 <option value="[% c %]" selected="selected">[% c %]</option>
202 <option value="[% c %]">[% c %]</option>
205 <input type="submit" value="Submit" />
207 [% IF ( category == 'Bsort1' ) %]
208 <p>An authorized value attached to patrons, that can be used for stats purposes</p>
210 [% IF ( category == 'Bsort2' ) %]
211 <p>An authorized value attached to patrons, that can be used for stats purposes</p>
213 [% IF ( category == 'Asort1' ) %]
214 <p>An authorized value attached to acquisitions, that can be used for stats purposes</p>
216 [% IF ( category == 'Asort2' ) %]
217 <p>An authorized value attached to acquisitions, that can be used for stats purposes</p>
219 [% IF ( category == 'SUGGEST' ) %]
220 <p>Reasons to reject or accept patron suggestions</p>
222 [% IF ( category == 'DAMAGED' ) %]
223 <p>Statuses to describe a damaged item</p>
225 [% IF ( category == 'LOST' ) %]
226 <p>Statuses to describe a lost item</p>
228 [% IF ( category == 'MANUAL_INV' ) %]
229 <p>Additional values for manual invoice types</p>
231 [% IF ( category == 'BOR_NOTES' ) %]
232 <p>Values for custom patron notes</p>
234 [% IF ( category == 'LOC' ) %]
235 <p>Values for shelving locations</p>
237 [% IF ( category == 'CCODE' ) %]
238 <p>Values for collection codes</p>
240 [% IF ( category == 'NOT_LOAN' ) %]
241 <p>Statuses to describe why an item is not for loan</p>
243 <h3>Authorized values for category [% category %]:</h3>
245 [% IF ( loop ) %]<div id="pagertable_authorized_values">
248 [% IF ( loop ) %]<table id="table_authorized_values">
250 <th>Authorized value</th>
252 <th>Description (OPAC)</th>
254 <th>Branches limitations</th>
259 [% FOREACH loo IN loop %]
260 [% UNLESS ( loop.odd ) %]
265 <td>[% loo.authorised_value %]</td>
266 <td>[% loo.lib %]</td>
267 <td>[% loo.lib_opac %]</td>
268 <td>[% IF ( loo.imageurl ) %]<img src="[% loo.imageurl %]" alt=""/>[% ELSE %] [% END %]</td>
270 [% IF loo.branches.size > 0 %]
271 [% branches_str = "" %]
272 [% FOREACH branch IN loo.branches %]
273 [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %]
275 <span href="#" title="[% branches_str %]">
276 [% IF loo.branches.size > 1 %]
277 [% loo.branches.size %] branches limitations
279 [% loo.branches.size %] branch limitation
285 <td><a href="/cgi-bin/koha/admin/authorised_values.pl?op=add_form&id=[% loo.id %]">Edit</a></td>
286 <td><a class="delete" href="/cgi-bin/koha/admin/authorised_values.pl?op=delete&searchfield=[% searchfield %]&id=[% loo.id %]">Delete</a></td>
289 </tbody></table>[% ELSE %]
290 <div class="dialog message">There are no authorized values defined for [% category %]</div>
293 [% IF ( isprevpage ) %]
294 <form class="inline" action="/cgi-bin/koha/admin/authorised_values.pl" method="post">
295 <input type="hidden" name="searchfield" value="[% searchfield %]" />
296 <input type="submit" value="<< Previous" /></form>
304 [% INCLUDE 'admin-menu.inc' %]
307 [% INCLUDE 'intranet-bottom.inc' %]