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 in use</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="" />
238 <ol class="oladditemtype">
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="defaultreplacecost">Default replacement cost: </label>
263 <input type="text" id="defaultreplacecost" name="defaultreplacecost" size="10" value="[% defaultreplacecost %]" />
266 <label for="processfee">Processing fee (when lost): </label>
267 <input type="text" id="processfee" name="processfee" size="10" value="[% processfee %]" />
270 <label for="checkinmsg">Checkin message: </label>
271 <textarea id="checkinmsg" name="checkinmsg" cols="55" rows="5">[% itemtype.checkinmsg %]</textarea>
274 <label for="checkinmsgtype">Checkin message type: </label>
275 <select type="text" id="checkinmsgtype" name="checkinmsgtype">
276 [% IF itemtype.checkinmsgtype == 'message' %]
277 <option value="message" selected="selected">Message</option>
279 <option value="message">Message</option>
281 [% IF itemtype.checkinmsgtype == 'alert' %]
282 <option value="alert" selected="selected">Alert</option>
284 <option value="alert">Alert</option>
289 <label for="sip_media_type">SIP media type: </label>
290 <select id="sip_media_type" name="sip_media_type">
291 <option value=""></option>
292 [% FOREACH a IN AuthorisedValues.Get('SIP_MEDIA_TYPE') %]
293 [% IF a.authorised_value == itemtype.sip_media_type %]
294 <option value="[% a.authorised_value %]" selected="selected">[% a.lib %]</option>
296 <option value="[% a.authorised_value %]">[% a.lib %]</option>
302 <label for="summary">Summary: </label>
303 <textarea id="summary" name="summary" cols="55" rows="5">[% itemtype.summary %]</textarea>
304 <p>Enter a summary that will overwrite the default one in search results lists. Example, for a website itemtype : </p>
305 <p><b><a href="[856u]">open site</a></b> will show the link just below the title</p>
310 <fieldset class="action">
311 <input type="submit" value="Save changes" />
312 <a href="/cgi-bin/koha/admin/itemtypes.pl" class="cancel">Cancel</a>
317 [% IF op == 'delete_confirm' %]
318 <div class="dialog alert">
319 <h3>Delete item type '[% itemtype.itemtype %]'?</h3>
322 <th scope="row">Item type</th>
323 <td>[% itemtype.itemtype %]</td>
325 <tr><th scope="row">Description</th><td>[% itemtype.translated_description %]</td></tr>
326 [% UNLESS Koha.Preference('noItemTypeImages') %]
328 <th scope="row">Image</th>
330 [% SET image_location = itemtype.image_location('intranet') %]
331 [% IF image_location %]<img src="[% image_location %]" alt="" />[% END %]
335 <tr><th scope="row">Rental charge</th><td>[% itemtype.rentalcharge | $Price %]</td></tr>
337 <form action="/cgi-bin/koha/admin/itemtypes.pl" method="post">
338 <input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="[% itemtype.itemtype %]" />
339 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this item type</button>
341 <form action="/cgi-bin/koha/admin/itemtypes.pl" method="post">
342 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
347 [% IF op == 'list' %]
348 <h2>Item types administration</h2>
350 <table id="table_item_type">
352 [% UNLESS Koha.Preference('noItemTypeImages') %]<th>Image</th>[% END %]
355 <th>Search category</th>
356 <th>Not for loan</th>
357 <th>Hide in OPAC</th>
359 <th>Default replacement cost</th>
360 <th>Processing fee (when lost)</th>
361 <th>Checkin message</th>
364 [% FOREACH itemtype IN itemtypes %]
366 [% UNLESS Koha.Preference('noItemTypeImages') %]
368 [% SET image_location = itemtype.image_location('intranet') %]
369 [% IF image_location %]<img src="[% image_location %]" alt="" />[% ELSE %] [% END %]
373 <a href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=[% itemtype.itemtype |html %]">
374 [% itemtype.itemtype %]
378 [% IF itemtype.translated_descriptions.size %]
379 [% itemtype.description %] (default)<br/>
380 [% FOR description IN itemtype.translated_descriptions %]
381 [% IF description.translation == itemtype.translated_description %]
382 <b>[% description.translation %]</b>
384 [% description.translation %] ([% description.lang %])
389 [% itemtype.description |html %]
392 <td>[% itemtype.searchcategory %]</td>
393 <td>[% IF ( itemtype.notforloan ) %]Yes[% ELSE %] [% END %]</td>
394 <td>[% IF ( itemtype.hideinopac ) %]Yes[% ELSE %] [% END %]</td>
396 [% UNLESS ( itemtype.notforloan ) %]
397 [% itemtype.rentalcharge | $Price %]
400 <td>[% itemtype.defaultreplacecost | $Price %]</td>
401 <td>[% itemtype.processfee | $Price %]</td>
402 <td>[% itemtype.checkinmsg | html | html_line_break %]</td>
404 <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>
405 <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>
411 <div class="dialog message">There are no itemtypes defined</div>
418 [% INCLUDE 'admin-menu.inc' %]
421 [% INCLUDE 'intranet-bottom.inc' %]