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 }
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 |html %]" required="required" /> <span class="required">Required</span>
143 [% IF can_be_translated %]
144 <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>
148 <span class="label">Search category</span>
149 <select id="searchcategory" name="searchcategory">
150 <option value="">None</option>
151 [% FOREACH cat IN searchcategory %]
152 [% IF cat.authorised_value == itemtype.searchcategory %]
153 <option value="[% cat.authorised_value %]" selected="selected">
157 <option value="[% cat.authorised_value %]" >
163 (Options are defined as the authorized values for the ITEMTYPECAT category)
165 [% IF Koha.Preference('noItemTypeImages') %]
167 <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>
171 [% UNLESS Koha.Preference('noItemTypeImages') %]
172 <div id="icons" class="toptabs" style="clear:both">
173 <h5 style="margin-left:10px;">Choose an icon:</h5>
175 <li><a href="#none">None</a></li>
176 [% FOREACH imageset IN imagesets %]
177 [% IF ( imageset.imagesetactive ) %]
178 <li class="ui-tabs-active">
182 <a href="#[% imageset.imagesetname %]">[% imageset.imagesetname %]</a>
185 [% IF itemtype.image_location.match('^http') %]<li class="ui-tabs-active">[% ELSE %]<li>[% END %]<a href="#remote">Remote image</a></li>
189 <li><label for="noimage">No image: </label><input type="radio" name="image" id="noimage" value="removeImage" /></li>
194 [% FOREACH imageset IN imagesets %]
195 <div id="[% imageset.imagesetname %]">
197 [% FOREACH image IN imageset.images %]
198 <li style="float: none; display: inline-block; clear : none; width: auto;">
200 [% IF image.StaffImageUrl %]
201 <img src="[% image.StaffImageUrl %]" alt="[% image.StaffImageUrl %]" title="[% image.StaffImageUrl %]" />
203 [% IF image.checked %]
204 <input type="radio" name="image" value="[% image.KohaImage %]" checked="checked" />
205 [% ELSIF image.KohaImage %] <!-- to delete the radio button if there is no image after -->
206 <input type="radio" name="image" value="[% image.KohaImage %]" />
219 <label for="remote_image_check"> Remote image:</label>
220 [% IF remote_image %]
221 <input type="radio" id="remote_image_check" name="image" value="remoteImage" checked="checked" />
223 <input type="radio" id="remote_image_check" name="image" value="remoteImage" />
225 <input type="text" name="remoteImage" size="48" maxlength="200" value="[% remote_image %]" onmousedown="document.getElementById('remote_image_check').checked = true;" />
226 [% IF ( remote_image ) %]
227 <img src="[% remote_image %]" alt="" />
237 <label for="hideinopac">Hide in OPAC: </label>
238 [% IF ( itemtype.hideinopac ) %]
239 <input type="checkbox" id="hideinopac" name="hideinopac" checked="checked" value="1" />
241 <input type="checkbox" id="hideinopac" name="hideinopac" value="1" />
243 (if checked, items of this type will be hidden as filters in OPAC's advanced search)
246 <label for="notforloan">Not for loan: </label>
247 [% IF itemtype.notforloan %]
248 <input type="checkbox" id="notforloan" name="notforloan" checked="checked" value="1" />
250 <input type="checkbox" id="notforloan" name="notforloan" value="1" />
252 (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)
255 <label for="rentalcharge">Rental charge: </label>
256 <input type="text" id="rentalcharge" name="rentalcharge" size="10" value="[% itemtype.rentalcharge %]" />
259 <label for="checkinmsg">Checkin message: </label>
260 <textarea id="checkinmsg" name="checkinmsg" cols="55" rows="5">[% itemtype.checkinmsg %]</textarea>
263 <label for="checkinmsgtype">Checkin message type: </label>
264 <select type="text" id="checkinmsgtype" name="checkinmsgtype">
265 [% IF itemtype.checkinmsgtype == 'message' %]
266 <option value="message" selected="selected">Message</option>
268 <option value="message">Message</option>
270 [% IF itemtype.checkinmsgtype == 'alert' %]
271 <option value="alert" selected="selected">Alert</option>
273 <option value="alert">Alert</option>
278 <label for="sip_media_type">SIP media type: </label>
279 <select id="sip_media_type" name="sip_media_type">
280 <option value=""></option>
281 [% FOREACH a IN AuthorisedValues.Get('SIP_MEDIA_TYPE') %]
282 [% IF a.authorised_value == itemtype.sip_media_type %]
283 <option value="[% a.authorised_value %]" selected="selected">[% a.lib %]</option>
285 <option value="[% a.authorised_value %]">[% a.lib %]</option>
291 <label for="summary">Summary: </label>
292 <textarea id="summary" name="summary" cols="55" rows="5">[% itemtype.summary %]</textarea>
293 <p>Enter a summary that will overwrite the default one in search results lists. Example, for a website itemtype : </p>
294 <p><b><a href="[856u]">open site</a></b> will show the link just below the title</p>
299 <fieldset class="action">
300 <input type="submit" value="Save changes" />
301 <a href="/cgi-bin/koha/admin/itemtypes.pl" class="cancel">Cancel</a>
306 [% IF op == 'delete_confirm' %]
307 <div class="dialog alert">
308 <h3>Delete item type '[% itemtype.itemtype %]'?</h3>
311 <th scope="row">Item type</th>
312 <td>[% itemtype.itemtype %]</td>
314 <tr><th scope="row">Description</th><td>[% itemtype.translated_description %]</td></tr>
315 [% UNLESS Koha.Preference('noItemTypeImages') %]
317 <th scope="row">Image</th>
319 [% IF itemtype.image_location %]<img src="[% itemtype.image_location %]" alt="" />[% END %]
323 <tr><th scope="row">Rental charge</th><td>[% itemtype.rentalcharge | $Price %]</td></tr>
325 <form action="/cgi-bin/koha/admin/itemtypes.pl" method="post">
326 <input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="[% itemtype.itemtype %]" />
327 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this item type</button>
329 <form action="/cgi-bin/koha/admin/itemtypes.pl" method="post">
330 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
335 [% IF op == 'list' %]
336 <h2>Item types administration</h2>
338 <table id="table_item_type">
340 [% UNLESS Koha.Preference('noItemTypeImages') %]<th>Image</th>[% END %]
343 <th>Search category</th>
344 <th>Not for loan</th>
345 <th>Hide in OPAC</th>
347 <th>Checkin message</th>
350 [% FOREACH itemtype IN itemtypes %]
352 [% UNLESS Koha.Preference('noItemTypeImages') %] <td>[% IF itemtype.image_location %]<img src="[% itemtype.image_location %]" alt="" />[% ELSE %] [% END %]</td>[% END %]
354 <a href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=[% itemtype.itemtype |html %]">
355 [% itemtype.itemtype %]
359 [% IF itemtype.translated_descriptions.size %]
360 [% itemtype.description %] (default)<br/>
361 [% FOR description IN itemtype.translated_descriptions %]
362 [% IF description.translation == itemtype.translated_description %]
363 <b>[% description.translation %]</b>
365 [% description.translation %] ([% description.lang %])
370 [% itemtype.description %]
373 <td>[% itemtype.searchcategory %]</td>
374 <td>[% IF ( itemtype.notforloan ) %]Yes[% ELSE %] [% END %]</td>
375 <td>[% IF ( itemtype.hideinopac ) %]Yes[% ELSE %] [% END %]</td>
377 [% UNLESS ( itemtype.notforloan ) %]
378 [% itemtype.rentalcharge | $Price %]
381 <td>[% itemtype.checkinmsg | html_line_break %]</td>
383 <a href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=[% itemtype.itemtype |html %]" class="btn btn-mini"><i class="fa fa-pencil"></i> Edit</a>
384 <a href="/cgi-bin/koha/admin/itemtypes.pl?op=delete_confirm&itemtype=[% itemtype.itemtype |html %]" class="btn btn-mini"><i class="fa fa-trash"></i> Delete</a>
390 <div class="dialog message">There are no itemtypes defined</div>
397 [% INCLUDE 'admin-menu.inc' %]
400 [% INCLUDE 'intranet-bottom.inc' %]