4 [% USE AuthorisedValues %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha › Administration › Item types [% IF op == 'add_form' %]›
10 Modify item type '[% itemtype.itemtype | html %]'
15 [% IF op == 'delete_confirm' %]›
17 Cannot delete item type '[% itemtype.itemtype | html %]'
19 Delete item type '[% itemtype.itemtype | html %]'?
22 [% IF op == 'delete_confirmed' %]›
26 [% INCLUDE 'doc-head-close.inc' %]
28 fieldset.rows div.toptabs li { clear:none;margin-right:.5em;padding-bottom:0;width:auto; }
29 fieldset.rows div.toptabs .ui-tabs-nav li.ui-tabs-active {background-color : #F4F8F9; }
30 fieldset.rows .ui-tabs-panel { margin-right : 10px; margin-left : 10px;margin-bottom:10px;}
31 fieldset.rows .ui-tabs-nav { margin-left : 10px; }
35 <body id="admin_itemtypes" class="admin">
36 [% INCLUDE 'header.inc' %]
37 [% INCLUDE 'prefs-admin-search.inc' %]
39 <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' %]
41 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Modify item type '[% itemtype.itemtype | html %]'
43 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Add item type
46 [% IF op == 'delete_confirm' %]
48 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Cannot delete item type '[% itemtype.itemtype | html %]'
50 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Delete item type '[% itemtype.itemtype | html %]'?
53 [% IF op == 'delete_confirmed' %]
54 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> ›Data deleted
57 Item types administration
60 <div class="main container-fluid">
62 <div class="col-sm-10 col-sm-push-2">
65 [% IF op == 'list' %]<div id="toolbar" class="btn-toolbar">
66 <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>
69 [% FOREACH m IN messages %]
70 <div class="dialog [% m.type | html %]">
72 [% CASE 'error_on_update' %]
73 An error occurred when updating this item type. Perhaps the value already exists.
74 [% CASE 'error_on_insert' %]
75 An error occurred when inserting this item type. Perhaps the value already exists.
76 [% CASE 'error_on_delete' %]
77 An error occurred when deleting this item type. Check the logs.
78 [% CASE 'success_on_update' %]
79 Item type updated successfully.
80 [% CASE 'success_on_insert' %]
81 Item type inserted successfully.
82 [% CASE 'success_on_delete' %]
83 Item type deleted successfully.
84 [% CASE 'already_exists' %]
85 This item type already exists.
86 [% CASE 'cannot_be_deleted' %]
87 Cannot delete this item type. <p><strong>This record is in use</strong>. Deletion is not possible.</p>
95 [% IF op == 'add_form' %]
97 <h3>Modify item type</h3>
99 <h3>Add item type</h3>
101 <form action="/cgi-bin/koha/admin/itemtypes.pl" name="Aform" method="post" id="itemtypeentry">
102 <input type="hidden" name="op" value="add_validate" />
103 <fieldset class="rows">
107 <input type="hidden" name="is_a_modif" value="1" />
108 <span class="label">Item type: </span> <input type="hidden" name="itemtype" value="[% itemtype.itemtype | html %]" />
109 [% itemtype.itemtype | html %]
113 <label for="itemtype" class="required">Item type: </label>
114 <input type="text" id="itemtype" name="itemtype" size="10" maxlength="10" required="required" /> <span class="required">Required</span>
118 <label for="description" class="required">Description: </label>
119 <input type="text" id="description" name="description" size="48" value="[% itemtype.description | html %]" required="required" /> <span class="required">Required</span>
120 [% IF can_be_translated %]
121 <a href="/cgi-bin/koha/admin/localization.pl?entity=itemtypes&code=[% itemtype.itemtype | uri %]" title="Translate item type [% itemtype.itemtype | html %]" rel="gb_page_center[600,500]"><i class="fa fa-pencil"></i> Translate into other languages</a>
125 <span class="label">Search category</span>
126 <select id="searchcategory" name="searchcategory">
127 <option value="">None</option>
128 [% FOREACH cat IN searchcategory %]
129 [% IF cat.authorised_value == itemtype.searchcategory %]
130 <option value="[% cat.authorised_value | html %]" selected="selected">
134 <option value="[% cat.authorised_value | html %]" >
140 <span class="hint">Options are defined as the authorized values for the ITEMTYPECAT category.</span>
142 [% IF Koha.Preference('noItemTypeImages') %]
144 <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>
148 [% UNLESS Koha.Preference('noItemTypeImages') %]
149 <div id="icons" class="toptabs" style="clear:both">
150 <h5 style="margin-left:10px;">Choose an icon:</h5>
152 <li><a href="#none">None</a></li>
153 [% FOREACH imageset IN imagesets %]
154 [% IF ( imageset.imagesetactive ) %]
155 <li class="ui-tabs-active">
159 <a href="#[% imageset.imagesetname | uri %]">[% imageset.imagesetname | html %]</a>
162 [% IF itemtype.image_location('intranet').match('^http') %]<li class="ui-tabs-active">[% ELSE %]<li>[% END %]<a href="#remote">Remote image</a></li>
166 <li><label for="noimage">No image: </label><input type="radio" name="image" id="noimage" value="removeImage" /></li>
171 [% FOREACH imageset IN imagesets %]
172 <div id="[% imageset.imagesetname | html %]">
174 [% FOREACH image IN imageset.images %]
175 <li style="float: none; display: inline-block; clear : none; width: auto;">
177 [% IF image.StaffImageUrl %]
178 <img src="[% image.StaffImageUrl | html %]" alt="[% image.StaffImageUrl | html %]" title="[% image.StaffImageUrl | html %]" />
180 [% IF image.checked %]
181 <input type="radio" name="image" value="[% image.KohaImage | html %]" checked="checked" />
182 [% ELSIF image.KohaImage %] <!-- to delete the radio button if there is no image after -->
183 <input type="radio" name="image" value="[% image.KohaImage | html %]" />
196 <label for="remote_image_check"> Remote image:</label>
197 [% IF itemtype.imageurl %]
198 <input type="radio" id="remote_image_check" name="image" value="remoteImage" checked="checked" />
200 <input type="radio" id="remote_image_check" name="image" value="remoteImage" />
202 <input type="text" name="remoteImage" size="48" maxlength="200" value="[% itemtype.imageurl | html %]" onmousedown="document.getElementById('remote_image_check').checked = true;" />
203 [% IF itemtype.imageurl %]
204 <img src="[% itemtype.imageurl | html %]" alt="" />
212 <ol class="oladditemtype">
214 <label for="hideinopac">Hide in OPAC: </label>
215 [% IF ( itemtype.hideinopac ) %]
216 <input type="checkbox" id="hideinopac" name="hideinopac" checked="checked" value="1" />
218 <input type="checkbox" id="hideinopac" name="hideinopac" value="1" />
220 <span class="hint">If checked, items of this type will be hidden as filters in OPAC's advanced search.</span>
223 <label for="notforloan">Not for loan: </label>
224 [% IF itemtype.notforloan %]
225 <input type="checkbox" id="notforloan" name="notforloan" checked="checked" value="1" />
227 <input type="checkbox" id="notforloan" name="notforloan" value="1" />
229 <span class="hint">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.</span>
232 <label for="rentalcharge">Rental charge: </label>
233 <input type="text" id="rentalcharge" name="rentalcharge" size="10" value="[% itemtype.rentalcharge | $Price on_editing => 1 %]" />
234 <span class="hint">This fee is charged once per checkout/renewal per item</span>
237 <label for="rentalcharge_daily">Daily rental charge: </label>
238 <input type="text" id="rentalcharge_daily" name="rentalcharge_daily" size="10" value="[% itemtype.rentalcharge_daily | $Price on_editing => 1 %]" />
239 <span class="hint">This fee is charged at checkout/renewal time for each day between the checkout/renewal date and due date for loans specified in days.</span>
242 <label for="rentalcharge_hourly">Hourly rental charge: </label>
243 <input type="text" id="rentalcharge_hourly" name="rentalcharge_hourly" size="10" value="[% itemtype.rentalcharge_hourly | $Price on_editing => 1 %]" />
244 <span class="hint">This fee is charged at checkout/renewal time for each hour between the checkout/renewal date and due date for loans specifie in hours.</span>
247 <label for="defaultreplacecost">Default replacement cost: </label>
248 <input type="text" id="defaultreplacecost" name="defaultreplacecost" size="10" value="[% itemtype.defaultreplacecost | html %]" />
251 <label for="processfee">Processing fee (when lost): </label>
252 <input type="text" id="processfee" name="processfee" size="10" value="[% itemtype.processfee | html %]" />
255 <label for="checkinmsg">Checkin message: </label>
256 <textarea id="checkinmsg" name="checkinmsg" cols="55" rows="5">[% itemtype.checkinmsg | html %]</textarea>
259 <label for="checkinmsgtype">Checkin message type: </label>
260 <select type="text" id="checkinmsgtype" name="checkinmsgtype">
261 [% IF itemtype.checkinmsgtype == 'message' %]
262 <option value="message" selected="selected">Message</option>
264 <option value="message">Message</option>
266 [% IF itemtype.checkinmsgtype == 'alert' %]
267 <option value="alert" selected="selected">Alert</option>
269 <option value="alert">Alert</option>
274 <label for="sip_media_type">SIP media type: </label>
275 <select id="sip_media_type" name="sip_media_type">
276 <option value=""></option>
277 [% FOREACH a IN AuthorisedValues.Get('SIP_MEDIA_TYPE') %]
278 [% IF a.authorised_value == itemtype.sip_media_type %]
279 <option value="[% a.authorised_value | html %]" selected="selected">[% a.lib | html %]</option>
281 <option value="[% a.authorised_value | html %]">[% a.lib | html %]</option>
287 <label for="summary">Summary: </label>
288 <textarea id="summary" name="summary" cols="55" rows="5">[% itemtype.summary | html %]</textarea>
289 <p>Enter a summary that will overwrite the default one in search results lists. Example, for a website itemtype : </p>
290 <p><b><a href="[856u]">open site</a></b> will show the link just below the title</p>
295 <fieldset class="action">
296 <input type="submit" value="Save changes" />
297 <a href="/cgi-bin/koha/admin/itemtypes.pl" class="cancel">Cancel</a>
302 [% IF op == 'delete_confirm' %]
303 <div class="dialog alert">
304 <h3>Delete item type '[% itemtype.itemtype | html %]'?</h3>
307 <th scope="row">Item type</th>
308 <td>[% itemtype.itemtype | html %]</td>
310 <tr><th scope="row">Description</th><td>[% itemtype.translated_description | html %]</td></tr>
311 [% UNLESS Koha.Preference('noItemTypeImages') %]
313 <th scope="row">Image</th>
315 [% SET image_location = itemtype.image_location('intranet') %]
316 [% IF image_location %]<img src="[% image_location | html %]" alt="" />[% END %]
320 <tr><th scope="row">Rental charge</th><td>[% itemtype.rentalcharge | $Price %]</td></tr>
322 <form action="/cgi-bin/koha/admin/itemtypes.pl" method="post">
323 <input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="[% itemtype.itemtype | html %]" />
324 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this item type</button>
326 <form action="/cgi-bin/koha/admin/itemtypes.pl" method="post">
327 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
332 [% IF op == 'list' %]
333 <h2>Item types administration</h2>
335 <table id="table_item_type">
337 [% UNLESS Koha.Preference('noItemTypeImages') %]<th>Image</th>[% END %]
340 <th>Search category</th>
341 <th>Not for loan</th>
342 <th>Hide in OPAC</th>
343 <th>Rental charge</th>
344 <th>Daily rental charge</th>
345 <th>Hourly rental charge</th>
346 <th>Default replacement cost</th>
347 <th>Processing fee (when lost)</th>
348 <th>Checkin message</th>
351 [% FOREACH itemtype IN itemtypes %]
353 [% UNLESS Koha.Preference('noItemTypeImages') %]
355 [% SET image_location = itemtype.image_location('intranet') %]
356 [% IF image_location %]<img src="[% image_location | html %]" alt="" />[% ELSE %] [% END %]
360 <a href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=[% itemtype.itemtype | uri %]">
361 [% itemtype.itemtype | html %]
365 [% IF itemtype.translated_descriptions.size %]
366 [% itemtype.description | html %] (default)<br/>
367 [% FOR description IN itemtype.translated_descriptions %]
368 [% IF description.translation == itemtype.translated_description %]
369 <b>[% description.translation | html %]</b>
371 [% description.translation | html %] ([% description.lang | html %])
376 [% itemtype.description | html %]
379 <td>[% itemtype.searchcategory | html %]</td>
380 <td>[% IF ( itemtype.notforloan ) %]Yes[% ELSE %] [% END %]</td>
381 <td>[% IF ( itemtype.hideinopac ) %]Yes[% ELSE %] [% END %]</td>
383 [% UNLESS ( itemtype.notforloan ) %]
384 [% itemtype.rentalcharge | $Price %]
388 [% UNLESS ( itemtype.notforloan ) %]
389 [% itemtype.rentalcharge_daily | $Price %]
393 [% UNLESS ( itemtype.notforloan ) %]
394 [% itemtype.rentalcharge_hourly | $Price %]
398 <td>[% itemtype.defaultreplacecost | $Price %]</td>
399 <td>[% itemtype.processfee | $Price %]</td>
400 <td>[% itemtype.checkinmsg | html_line_break | $raw %]</td>
402 <a href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=[% itemtype.itemtype | uri %]" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
403 <a href="/cgi-bin/koha/admin/itemtypes.pl?op=delete_confirm&itemtype=[% itemtype.itemtype | uri %]" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</a>
409 <div class="dialog message">There are no itemtypes defined</div>
414 </div> <!-- /.col-sm-10.col-sm-push-2 -->
416 <div class="col-sm-2 col-sm-pull-10">
418 [% INCLUDE 'admin-menu.inc' %]
420 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
421 </div> <!-- /.row -->
423 [% MACRO jsinclude BLOCK %]
424 [% Asset.js("js/admin-menu.js") | $raw %]
425 [% INCLUDE 'greybox.inc' %]
426 [% INCLUDE 'datatables.inc' %]
428 $(document).ready(function() {
430 $("#table_item_type").dataTable($.extend(true, {}, dataTablesDefaults, {
432 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
434 "aaSorting": [[ 2, "asc" ]],
435 "iDisplayLength": 10,
436 "sPaginationType": "four_button"
438 $( "#itemtypeentry" ).validate({
440 itemtype: { required: true },
441 description: { required: true },
442 rentalcharge: { number: true }
445 $("#itemtype").on("blur",function(){
452 [% INCLUDE 'intranet-bottom.inc' %]