2 [% USE AuthorisedValues %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha › Administration › Item types [% IF op == 'add_form' %]›
7 Modify item type '[% itemtype.itemtype %]'
12 [% IF op == 'delete_confirm' %]›
14 Cannot delete item type '[% itemtype.itemtype %]'
16 Delete item type '[% itemtype.itemtype %]'?
19 [% IF op == 'delete_confirmed' %]›
23 [% INCLUDE 'doc-head-close.inc' %]
24 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
25 [% INCLUDE 'greybox.inc' %]
26 [% INCLUDE 'datatables.inc' %]
27 <script type="text/javascript">
29 $(document).ready(function() {
31 $("#table_item_type").dataTable($.extend(true, {}, dataTablesDefaults, {
33 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
35 "aaSorting": [[ 2, "asc" ]],
37 "sPaginationType": "four_button"
39 $( "#itemtypeentry" ).validate({
41 itemtype: { required: true },
42 description: { required: true },
43 rentalcharge: { number: true }
46 $("#itemtype").on("blur",function(){
52 <style type="text/css">
53 fieldset.rows div.toptabs li { clear:none;margin-right:.5em;padding-bottom:0;width:auto; }
54 fieldset.rows div.toptabs .ui-tabs-nav li.ui-tabs-active {background-color : #F4F8F9; }
55 fieldset.rows .ui-tabs-panel { margin-right : 10px; margin-left : 10px;margin-bottom:10px;}
56 fieldset.rows .ui-tabs-nav { margin-left : 10px; }
59 <body id="admin_itemtypes" class="admin">
60 [% INCLUDE 'header.inc' %]
61 [% INCLUDE 'prefs-admin-search.inc' %]
63 <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' %]
65 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Modify item type '[% itemtype.itemtype %]'
67 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Add item type
70 [% IF op == 'delete_confirm' %]
72 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Cannot delete item type '[% itemtype.itemtype %]'
74 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Delete item type '[% itemtype.itemtype %]'?
77 [% IF op == 'delete_confirmed' %]
78 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> ›Data deleted
81 Item types administration
84 <div id="doc3" class="yui-t2">
91 [% IF op == 'list' %]<div id="toolbar" class="btn-toolbar">
92 <a class="btn btn-default btn-sm" id="newitemtype" href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form"><i class="fa fa-plus"></i> New item type</a>
95 [% FOREACH m IN messages %]
96 <div class="dialog [% m.type %]">
98 [% CASE 'error_on_update' %]
99 An error occurred when updating this item type. Perhaps the value already exists.
100 [% CASE 'error_on_insert' %]
101 An error occurred when inserting this item type. Perhaps the value already exists.
102 [% CASE 'error_on_delete' %]
103 An error occurred when deleting this item type. Check the logs.
104 [% CASE 'success_on_update' %]
105 Item type updated successfully.
106 [% CASE 'success_on_insert' %]
107 Item type inserted successfully.
108 [% CASE 'success_on_delete' %]
109 Item type deleted successfully.
110 [% CASE 'already_exists' %]
111 This item type already exists.
112 [% CASE 'cannot_be_deleted' %]
113 Cannot delete this item type. <p><strong>This record is used [% m.total %] times</strong>. Deletion is not possible.</p>
121 [% IF op == 'add_form' %]
123 <h3>Modify item type</h3>
125 <h3>Add item type</h3>
127 <form action="/cgi-bin/koha/admin/itemtypes.pl" name="Aform" method="post" id="itemtypeentry">
128 <input type="hidden" name="op" value="add_validate" />
129 <fieldset class="rows">
133 <input type="hidden" name="is_a_modif" value="1" />
134 <span class="label">Item type: </span> <input type="hidden" name="itemtype" value="[% itemtype.itemtype %]" />
135 [% itemtype.itemtype %]
139 <label for="itemtype" class="required">Item type: </label>
140 <input type="text" id="itemtype" name="itemtype" size="10" maxlength="10" required="required" /> <span class="required">Required</span>
144 <label for="description" class="required">Description: </label>
145 <input type="text" id="description" name="description" size="48" value="[% itemtype.description |html %]" required="required" /> <span class="required">Required</span>
146 [% IF can_be_translated %]
147 <a href="/cgi-bin/koha/admin/localization.pl?entity=itemtypes&code=[% itemtype.itemtype %]" title="Translate item type [% itemtype.itemtype %]" rel="gb_page_center[600,500]"><i class="fa fa-pencil"></i> Translate into other languages</a>
151 <span class="label">Search category</span>
152 <select id="searchcategory" name="searchcategory">
153 <option value="">None</option>
154 [% FOREACH cat IN searchcategory %]
155 [% IF cat.authorised_value == itemtype.searchcategory %]
156 <option value="[% cat.authorised_value %]" selected="selected">
160 <option value="[% cat.authorised_value %]" >
166 (Options are defined as the authorized values for the ITEMTYPECAT category)
168 [% IF Koha.Preference('noItemTypeImages') %]
170 <span class="label">Image: </span>Item type images are disabled. To enable them, turn off the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=noItemTypeImages">noItemTypeImages system preference</a>
174 [% UNLESS Koha.Preference('noItemTypeImages') %]
175 <div id="icons" class="toptabs" style="clear:both">
176 <h5 style="margin-left:10px;">Choose an icon:</h5>
178 <li><a href="#none">None</a></li>
179 [% FOREACH imageset IN imagesets %]
180 [% IF ( imageset.imagesetactive ) %]
181 <li class="ui-tabs-active">
185 <a href="#[% imageset.imagesetname %]">[% imageset.imagesetname %]</a>
188 [% IF itemtype.image_location('intranet').match('^http') %]<li class="ui-tabs-active">[% ELSE %]<li>[% END %]<a href="#remote">Remote image</a></li>
192 <li><label for="noimage">No image: </label><input type="radio" name="image" id="noimage" value="removeImage" /></li>
197 [% FOREACH imageset IN imagesets %]
198 <div id="[% imageset.imagesetname %]">
200 [% FOREACH image IN imageset.images %]
201 <li style="float: none; display: inline-block; clear : none; width: auto;">
203 [% IF image.StaffImageUrl %]
204 <img src="[% image.StaffImageUrl %]" alt="[% image.StaffImageUrl %]" title="[% image.StaffImageUrl %]" />
206 [% IF image.checked %]
207 <input type="radio" name="image" value="[% image.KohaImage %]" checked="checked" />
208 [% ELSIF image.KohaImage %] <!-- to delete the radio button if there is no image after -->
209 <input type="radio" name="image" value="[% image.KohaImage %]" />
222 <label for="remote_image_check"> Remote image:</label>
223 [% IF remote_image %]
224 <input type="radio" id="remote_image_check" name="image" value="remoteImage" checked="checked" />
226 <input type="radio" id="remote_image_check" name="image" value="remoteImage" />
228 <input type="text" name="remoteImage" size="48" maxlength="200" value="[% remote_image %]" onmousedown="document.getElementById('remote_image_check').checked = true;" />
229 [% IF ( remote_image ) %]
230 <img src="[% remote_image %]" alt="" />
240 <label for="hideinopac">Hide in OPAC: </label>
241 [% IF ( itemtype.hideinopac ) %]
242 <input type="checkbox" id="hideinopac" name="hideinopac" checked="checked" value="1" />
244 <input type="checkbox" id="hideinopac" name="hideinopac" value="1" />
246 (if checked, items of this type will be hidden as filters in OPAC's advanced search)
249 <label for="notforloan">Not for loan: </label>
250 [% IF itemtype.notforloan %]
251 <input type="checkbox" id="notforloan" name="notforloan" checked="checked" value="1" />
253 <input type="checkbox" id="notforloan" name="notforloan" value="1" />
255 (if checked, no item of this type can be issued. If not checked, every item of this type can be issued unless notforloan is set for a specific item)
258 <label for="rentalcharge">Rental charge: </label>
259 <input type="text" id="rentalcharge" name="rentalcharge" size="10" value="[% itemtype.rentalcharge %]" />
262 <label for="checkinmsg">Checkin message: </label>
263 <textarea id="checkinmsg" name="checkinmsg" cols="55" rows="5">[% itemtype.checkinmsg %]</textarea>
266 <label for="checkinmsgtype">Checkin message type: </label>
267 <select type="text" id="checkinmsgtype" name="checkinmsgtype">
268 [% IF itemtype.checkinmsgtype == 'message' %]
269 <option value="message" selected="selected">Message</option>
271 <option value="message">Message</option>
273 [% IF itemtype.checkinmsgtype == 'alert' %]
274 <option value="alert" selected="selected">Alert</option>
276 <option value="alert">Alert</option>
281 <label for="sip_media_type">SIP media type: </label>
282 <select id="sip_media_type" name="sip_media_type">
283 <option value=""></option>
284 [% FOREACH a IN AuthorisedValues.Get('SIP_MEDIA_TYPE') %]
285 [% IF a.authorised_value == itemtype.sip_media_type %]
286 <option value="[% a.authorised_value %]" selected="selected">[% a.lib %]</option>
288 <option value="[% a.authorised_value %]">[% a.lib %]</option>
294 <label for="summary">Summary: </label>
295 <textarea id="summary" name="summary" cols="55" rows="5">[% itemtype.summary %]</textarea>
296 <p>Enter a summary that will overwrite the default one in search results lists. Example, for a website itemtype : </p>
297 <p><b><a href="[856u]">open site</a></b> will show the link just below the title</p>
302 <fieldset class="action">
303 <input type="submit" value="Save changes" />
304 <a href="/cgi-bin/koha/admin/itemtypes.pl" class="cancel">Cancel</a>
309 [% IF op == 'delete_confirm' %]
310 <div class="dialog alert">
311 <h3>Delete item type '[% itemtype.itemtype %]'?</h3>
314 <th scope="row">Item type</th>
315 <td>[% itemtype.itemtype %]</td>
317 <tr><th scope="row">Description</th><td>[% itemtype.translated_description %]</td></tr>
318 [% UNLESS Koha.Preference('noItemTypeImages') %]
320 <th scope="row">Image</th>
322 [% SET image_location = itemtype.image_location('intranet') %]
323 [% IF image_location %]<img src="[% image_location %]" alt="" />[% END %]
327 <tr><th scope="row">Rental charge</th><td>[% itemtype.rentalcharge | $Price %]</td></tr>
329 <form action="/cgi-bin/koha/admin/itemtypes.pl" method="post">
330 <input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="[% itemtype.itemtype %]" />
331 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this item type</button>
333 <form action="/cgi-bin/koha/admin/itemtypes.pl" method="post">
334 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
339 [% IF op == 'list' %]
340 <h2>Item types administration</h2>
342 <table id="table_item_type">
344 [% UNLESS Koha.Preference('noItemTypeImages') %]<th>Image</th>[% END %]
347 <th>Search category</th>
348 <th>Not for loan</th>
349 <th>Hide in OPAC</th>
351 <th>Checkin message</th>
354 [% FOREACH itemtype IN itemtypes %]
356 [% UNLESS Koha.Preference('noItemTypeImages') %]
358 [% SET image_location = itemtype.image_location('intranet') %]
359 [% IF image_location %]<img src="[% image_location %]" alt="" />[% ELSE %] [% END %]
363 <a href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=[% itemtype.itemtype |html %]">
364 [% itemtype.itemtype %]
368 [% IF itemtype.translated_descriptions.size %]
369 [% itemtype.description %] (default)<br/>
370 [% FOR description IN itemtype.translated_descriptions %]
371 [% IF description.translation == itemtype.translated_description %]
372 <b>[% description.translation %]</b>
374 [% description.translation %] ([% description.lang %])
379 [% itemtype.description %]
382 <td>[% itemtype.searchcategory %]</td>
383 <td>[% IF ( itemtype.notforloan ) %]Yes[% ELSE %] [% END %]</td>
384 <td>[% IF ( itemtype.hideinopac ) %]Yes[% ELSE %] [% END %]</td>
386 [% UNLESS ( itemtype.notforloan ) %]
387 [% itemtype.rentalcharge | $Price %]
390 <td>[% itemtype.checkinmsg | html_line_break %]</td>
392 <a href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=[% itemtype.itemtype |html %]" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
393 <a href="/cgi-bin/koha/admin/itemtypes.pl?op=delete_confirm&itemtype=[% itemtype.itemtype |html %]" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</a>
399 <div class="dialog message">There are no itemtypes defined</div>
406 [% INCLUDE 'admin-menu.inc' %]
409 [% INCLUDE 'intranet-bottom.inc' %]