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 (Options are defined as the authorized values for the ITEMTYPECAT category)
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 (if checked, items of this type will be hidden as filters in OPAC's advanced search)
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 (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)
232 <label for="rentalcharge">Rental charge: </label>
233 <input type="text" id="rentalcharge" name="rentalcharge" size="10" value="[% itemtype.rentalcharge | html %]" />
236 <label for="defaultreplacecost">Default replacement cost: </label>
237 <input type="text" id="defaultreplacecost" name="defaultreplacecost" size="10" value="[% itemtype.defaultreplacecost | html %]" />
240 <label for="processfee">Processing fee (when lost): </label>
241 <input type="text" id="processfee" name="processfee" size="10" value="[% itemtype.processfee | html %]" />
244 <label for="checkinmsg">Checkin message: </label>
245 <textarea id="checkinmsg" name="checkinmsg" cols="55" rows="5">[% itemtype.checkinmsg | html %]</textarea>
248 <label for="checkinmsgtype">Checkin message type: </label>
249 <select type="text" id="checkinmsgtype" name="checkinmsgtype">
250 [% IF itemtype.checkinmsgtype == 'message' %]
251 <option value="message" selected="selected">Message</option>
253 <option value="message">Message</option>
255 [% IF itemtype.checkinmsgtype == 'alert' %]
256 <option value="alert" selected="selected">Alert</option>
258 <option value="alert">Alert</option>
263 <label for="sip_media_type">SIP media type: </label>
264 <select id="sip_media_type" name="sip_media_type">
265 <option value=""></option>
266 [% FOREACH a IN AuthorisedValues.Get('SIP_MEDIA_TYPE') %]
267 [% IF a.authorised_value == itemtype.sip_media_type %]
268 <option value="[% a.authorised_value | html %]" selected="selected">[% a.lib | html %]</option>
270 <option value="[% a.authorised_value | html %]">[% a.lib | html %]</option>
276 <label for="summary">Summary: </label>
277 <textarea id="summary" name="summary" cols="55" rows="5">[% itemtype.summary | html %]</textarea>
278 <p>Enter a summary that will overwrite the default one in search results lists. Example, for a website itemtype : </p>
279 <p><b><a href="[856u]">open site</a></b> will show the link just below the title</p>
284 <fieldset class="action">
285 <input type="submit" value="Save changes" />
286 <a href="/cgi-bin/koha/admin/itemtypes.pl" class="cancel">Cancel</a>
291 [% IF op == 'delete_confirm' %]
292 <div class="dialog alert">
293 <h3>Delete item type '[% itemtype.itemtype | html %]'?</h3>
296 <th scope="row">Item type</th>
297 <td>[% itemtype.itemtype | html %]</td>
299 <tr><th scope="row">Description</th><td>[% itemtype.translated_description | html %]</td></tr>
300 [% UNLESS Koha.Preference('noItemTypeImages') %]
302 <th scope="row">Image</th>
304 [% SET image_location = itemtype.image_location('intranet') %]
305 [% IF image_location %]<img src="[% image_location | html %]" alt="" />[% END %]
309 <tr><th scope="row">Rental charge</th><td>[% itemtype.rentalcharge | $Price %]</td></tr>
311 <form action="/cgi-bin/koha/admin/itemtypes.pl" method="post">
312 <input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="[% itemtype.itemtype | html %]" />
313 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this item type</button>
315 <form action="/cgi-bin/koha/admin/itemtypes.pl" method="post">
316 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
321 [% IF op == 'list' %]
322 <h2>Item types administration</h2>
324 <table id="table_item_type">
326 [% UNLESS Koha.Preference('noItemTypeImages') %]<th>Image</th>[% END %]
329 <th>Search category</th>
330 <th>Not for loan</th>
331 <th>Hide in OPAC</th>
333 <th>Default replacement cost</th>
334 <th>Processing fee (when lost)</th>
335 <th>Checkin message</th>
338 [% FOREACH itemtype IN itemtypes %]
340 [% UNLESS Koha.Preference('noItemTypeImages') %]
342 [% SET image_location = itemtype.image_location('intranet') %]
343 [% IF image_location %]<img src="[% image_location | html %]" alt="" />[% ELSE %] [% END %]
347 <a href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=[% itemtype.itemtype | uri %]">
348 [% itemtype.itemtype | html %]
352 [% IF itemtype.translated_descriptions.size %]
353 [% itemtype.description | html %] (default)<br/>
354 [% FOR description IN itemtype.translated_descriptions %]
355 [% IF description.translation == itemtype.translated_description %]
356 <b>[% description.translation | html %]</b>
358 [% description.translation | html %] ([% description.lang | html %])
363 [% itemtype.description | html %]
366 <td>[% itemtype.searchcategory | html %]</td>
367 <td>[% IF ( itemtype.notforloan ) %]Yes[% ELSE %] [% END %]</td>
368 <td>[% IF ( itemtype.hideinopac ) %]Yes[% ELSE %] [% END %]</td>
370 [% UNLESS ( itemtype.notforloan ) %]
371 [% itemtype.rentalcharge | $Price %]
374 <td>[% itemtype.defaultreplacecost | $Price %]</td>
375 <td>[% itemtype.processfee | $Price %]</td>
376 <td>[% itemtype.checkinmsg | html_line_break | $raw %]</td>
378 <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>
379 <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>
385 <div class="dialog message">There are no itemtypes defined</div>
390 </div> <!-- /.col-sm-10.col-sm-push-2 -->
392 <div class="col-sm-2 col-sm-pull-10">
394 [% INCLUDE 'admin-menu.inc' %]
396 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
397 </div> <!-- /.row -->
399 [% MACRO jsinclude BLOCK %]
400 [% Asset.js("js/admin-menu.js") | $raw %]
401 [% INCLUDE 'greybox.inc' %]
402 [% INCLUDE 'datatables.inc' %]
404 $(document).ready(function() {
406 $("#table_item_type").dataTable($.extend(true, {}, dataTablesDefaults, {
408 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
410 "aaSorting": [[ 2, "asc" ]],
411 "iDisplayLength": 10,
412 "sPaginationType": "four_button"
414 $( "#itemtypeentry" ).validate({
416 itemtype: { required: true },
417 description: { required: true },
418 rentalcharge: { number: true }
421 $("#itemtype").on("blur",function(){
428 [% INCLUDE 'intranet-bottom.inc' %]