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="[% themelang %]/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 }
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_itemtypes" class="admin">
57 [% INCLUDE 'header.inc' %]
58 [% INCLUDE 'cat-search.inc' %]
60 <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' %]
62 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Modify item type '[% itemtype.itemtype %]'
64 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Add item type
67 [% IF op == 'delete_confirm' %]
69 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Cannot delete item type '[% itemtype.itemtype %]'
71 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Delete item type '[% itemtype.itemtype %]'?
74 [% IF op == 'delete_confirmed' %]
75 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> ›Data deleted
78 Item types administration
81 <div id="doc3" class="yui-t2">
88 [% IF op == 'list' %]<div id="toolbar" class="btn-toolbar">
89 <a class="btn btn-small" id="newitemtype" href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form"><i class="fa fa-plus"></i> New item type</a>
92 [% FOREACH m IN messages %]
93 <div class="dialog [% m.type %]">
95 [% CASE 'error_on_update' %]
96 An error occurred when updating this item type. Perhaps the value already exists.
97 [% CASE 'error_on_insert' %]
98 An error occurred when inserting this item type. Perhaps the value already exists.
99 [% CASE 'error_on_delete' %]
100 An error occurred when deleting this item type. Check the logs.
101 [% CASE 'success_on_update' %]
102 Item type updated successfully.
103 [% CASE 'success_on_insert' %]
104 Item type inserted successfully.
105 [% CASE 'success_on_delete' %]
106 Item type deleted successfully.
107 [% CASE 'already_exists' %]
108 This item type already exists.
109 [% CASE 'cannot_be_deleted' %]
110 Cannot delete this item type. <p><strong>This record is used [% m.total %] times</strong>. Deletion is not possible.</p>
118 [% IF op == 'add_form' %]
120 <h3>Modify item type</h3>
122 <h3>Add item type</h3>
124 <form action="/cgi-bin/koha/admin/itemtypes.pl" name="Aform" method="post" id="itemtypeentry">
125 <input type="hidden" name="op" value="add_validate" />
126 <fieldset class="rows">
130 <input type="hidden" name="is_a_modif" value="1" />
131 <span class="label">Item type: </span> <input type="hidden" name="itemtype" value="[% itemtype.itemtype %]" />
132 [% itemtype.itemtype %]
136 <label for="itemtype" class="required">Item type: </label>
137 <input type="text" id="itemtype" name="itemtype" size="10" maxlength="10" onblur="toUC(this)" required="required" /> <span class="required">Required</span>
141 <label for="description" class="required">Description: </label>
142 <input type="text" id="description" name="description" size="48" value="[% itemtype.description %]" required="required" /> <span class="required">Required</span>
143 <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="icon-edit"></i> Translate into other languages</a>
146 <span class="label">Search category</span>
147 <select id="searchcategory" name="searchcategory">
148 <option value="">None</option>
149 [% FOREACH cat IN searchcategory %]
150 [% IF cat.selected %]
151 <option value="[% cat.authorised_value %]" selected="selected">
155 <option value="[% cat.authorised_value %]" >
161 (Options are defined as the authorized values for the ITEMTYPECAT category)
163 [% IF Koha.Preference('noItemTypeImages') %]
165 <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>
169 [% UNLESS Koha.Preference('noItemTypeImages') %]
170 <div id="icons" class="toptabs" style="clear:both">
171 <h5 style="margin-left:10px;">Choose an icon:</h5>
173 <li><a href="#none">None</a></li>
174 [% FOREACH imageset IN imagesets %]
175 [% IF ( imageset.imagesetactive ) %]
176 <li class="ui-tabs-active">
180 <a href="#[% imageset.imagesetname %]">[% imageset.imagesetname %]</a>
183 [% IF itemtype.image_location.match('^http') %]<li class="ui-tabs-active">[% ELSE %]<li>[% END %]<a href="#remote">Remote image</a></li>
187 <li><label for="noimage">No image: </label><input type="radio" name="image" id="noimage" value="removeImage" /></li>
192 [% FOREACH imageset IN imagesets %]
193 <div id="[% imageset.imagesetname %]">
195 [% FOREACH image IN imageset.images %]
196 <li style="float: none; display: inline-block; clear : none; width: auto;">
198 [% IF image.StaffImageUrl %]
199 <img src="[% image.StaffImageUrl %]" alt="[% image.StaffImageUrl %]" title="[% image.StaffImageUrl %]" />
201 [% IF image.checked %]
202 <input type="radio" name="image" value="[% image.KohaImage %]" checked="checked" />
203 [% ELSIF image.KohaImage %] <!-- to delete the radio button if there is no image after -->
204 <input type="radio" name="image" value="[% image.KohaImage %]" />
217 <label for="remote_image_check"> Remote image:</label>
218 [% IF remote_image %]
219 <input type="radio" id="remote_image_check" name="image" value="remoteImage" checked="checked" />
221 <input type="radio" id="remote_image_check" name="image" value="remoteImage" />
223 <input type="text" name="remoteImage" size="48" maxlength="200" value="[% remote_image %]" onmousedown="document.getElementById('remote_image_check').checked = true;" />
224 [% IF ( remote_image ) %]
225 <img src="[% remote_image %]" alt="" />
235 <label for="hideinopac">Hide in OPAC: </label>
236 [% IF ( itemtype.hideinopac ) %]
237 <input type="checkbox" id="hideinopac" name="hideinopac" checked="checked" value="1" />
239 <input type="checkbox" id="hideinopac" name="hideinopac" value="1" />
241 (if checked, items of this type will be hidden as filters in OPAC's advanced search)
244 <label for="notforloan">Not for loan: </label>
245 [% IF itemtype.notforloan %]
246 <input type="checkbox" id="notforloan" name="notforloan" checked="checked" value="1" />
248 <input type="checkbox" id="notforloan" name="notforloan" value="1" />
250 (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)
253 <label for="rentalcharge">Rental charge: </label>
254 <input type="text" id="rentalcharge" name="rentalcharge" size="10" value="[% itemtype.rentalcharge %]" />
257 <label for="checkinmsg">Checkin message: </label>
258 <textarea id="checkinmsg" name="checkinmsg" cols="55" rows="5">[% itemtype.checkinmsg %]</textarea>
261 <label for="checkinmsgtype">Checkin message type: </label>
262 <select type="text" id="checkinmsgtype" name="checkinmsgtype">
263 [% IF itemtype.checkinmsgtype == 'message' %]
264 <option value="message" selected="selected">Message</option>
266 <option value="message">Message</option>
268 [% IF itemtype.checkinmsgtype == 'alert' %]
269 <option value="alert" selected="selected">Alert</option>
271 <option value="alert">Alert</option>
276 <label for="sip_media_type">SIP media type: </label>
277 <select id="sip_media_type" name="sip_media_type">
278 <option value=""></option>
279 [% FOREACH a IN AuthorisedValues.Get('SIP_MEDIA_TYPE', itemtype.sip_media_type ) %]
281 <option value="[% a.authorised_value %]" selected="selected">[% a.lib %]</option>
283 <option value="[% a.authorised_value %]">[% a.lib %]</option>
289 <label for="summary">Summary: </label>
290 <textarea id="summary" name="summary" cols="55" rows="5">[% itemtype.summary %]</textarea>
291 <p>Enter a summary that will overwrite the default one in search results lists. Example, for a website itemtype : </p>
292 <p><b><a href="[856u]">open site</a></b> will show the link just below the title</p>
297 <fieldset class="action">
298 <input type="submit" value="Save changes" />
299 <a href="/cgi-bin/koha/admin/itemtypes.pl" class="cancel">Cancel</a>
304 [% IF op == 'delete_confirm' %]
305 <div class="dialog message">
306 <h3>Delete item type '[% itemtype.itemtype %]'?</h3>
309 <th scope="row">Item type</th>
310 <td>[% itemtype.itemtype %]</td>
312 <tr><th scope="row">Description</th><td>[% itemtype.translated_description %]</td></tr>
313 [% UNLESS Koha.Preference('noItemTypeImages') %]
315 <th scope="row">Image</th>
317 [% IF itemtype.image_location %]<img src="[% itemtype.image_location %]" alt="" />[% END %]
321 <tr><th scope="row">Rental charge</th><td>[% itemtype.rentalcharge | $Price %]</td></tr>
323 <form action="/cgi-bin/koha/admin/itemtypes.pl" method="post">
324 <input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="[% itemtype.itemtype %]" />
325 <input type="submit" class="approve" value="Delete this Item Type" />
327 <form action="/cgi-bin/koha/admin/itemtypes.pl" method="post"><input type="submit" class="deny" value="Do Not Delete" /></form>
331 [% IF op == 'list' %]
332 <h2>Item types administration</h2>
334 <table id="table_item_type">
336 [% UNLESS Koha.Preference('noItemTypeImages') %]<th>Image</th>[% END %]
339 <th>Search category</th>
340 <th>Not for loan</th>
341 <th>Hide in OPAC</th>
343 <th>Checkin message</th>
346 [% FOREACH itemtype IN itemtypes %]
348 [% UNLESS Koha.Preference('noItemTypeImages') %] <td>[% IF itemtype.image_location %]<img src="[% itemtype.image_location %]" alt="" />[% ELSE %] [% END %]</td>[% END %]
350 <a href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=[% itemtype.itemtype %]">
351 [% itemtype.itemtype %]
355 [% IF itemtype.translated_descriptions.size %]
356 [% itemtype.description %] (default)<br/>
357 [% FOR description IN itemtype.translated_descriptions %]
358 [% IF description.translation == itemtype.translated_description %]
359 <b>[% description.translation %]</b>
361 [% description.translation %] ([% description.lang %])
366 [% itemtype.description %]
369 <td>[% itemtype.searchcategory %]</td>
370 <td>[% IF ( itemtype.notforloan ) %]Yes[% ELSE %] [% END %]</td>
371 <td>[% IF ( itemtype.hideinopac ) %]Yes[% ELSE %] [% END %]</td>
373 [% UNLESS ( itemtype.notforloan ) %]
374 [% itemtype.rentalcharge | $Price %]
377 <td>[% itemtype.checkinmsg | html_line_break %]</td>
379 <a href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=[% itemtype.itemtype %]">Edit</a>
380 <a href="/cgi-bin/koha/admin/itemtypes.pl?op=delete_confirm&itemtype=[% itemtype.itemtype %]">Delete</a>
386 <div class="dialog message">There are no itemtypes defined</div>
393 [% INCLUDE 'admin-menu.inc' %]
396 [% INCLUDE 'intranet-bottom.inc' %]