Bug 35650: (follow-up) Other cases found
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / itemtypes.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE Branches %]
5 [% USE AuthorisedValues %]
6 [% USE Price %]
7 [% USE TablesSettings %]
8 [% PROCESS 'i18n.inc' %]
9 [% SET footerjs = 1 %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 <title>[% FILTER collapse %]
12     [% IF op == 'add_form' %]
13         [% IF ( itemtype ) %]
14             [% tx("Modify item type '{item_type}'", { item_type = itemtype.itemtype }) | html %]
15         [% ELSE %]
16             [% t("New item type") | html %]
17         [% END %] &rsaquo;
18     [% END %]
19     [% IF op == 'delete_confirm' %]
20         [% IF ( total ) %]
21             [% tx("Cannot delete item type '{item_type}'", { item_type = itemtype.itemtype }) | html %]
22         [% ELSE %]
23             [% tx("Confirm deletion of item type '{item_type}'?", { item_type = itemtype.itemtype }) | html %]
24         [% END %] &rsaquo;
25     [% END %]
26     [% IF op == 'delete_confirmed' %]
27         [% t("Data deleted") | html %] &rsaquo;
28     [% END %]
29     [% t("Item types") | html %] &rsaquo;
30     [% t("Administration") | html %] &rsaquo;
31     [% t("Koha") | html %]
32 [% END %]</title>
33 [% INCLUDE 'doc-head-close.inc' %]
34 [% FILTER collapse %]
35     <style>
36         fieldset.rows div.toptabs li {
37             clear: none;
38             margin-right:.4em;
39             padding-bottom: 0;
40             width: auto;
41         }
42         .itemtype-icons {
43             display: flex;
44             flex-wrap: wrap;
45             clear: both;
46         }
47         .itemtype-icons label {
48             float: none;
49             width: auto;
50         }
51     </style>
52 [% END %]
53 </head>
54
55 <body id="admin_itemtypes" class="admin">
56 [% WRAPPER 'header.inc' %]
57     [% INCLUDE 'prefs-admin-search.inc' %]
58 [% END %]
59
60 [% WRAPPER 'sub-header.inc' %]
61     [% WRAPPER breadcrumbs %]
62        [% WRAPPER breadcrumb_item %]
63             <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
64         [% END %]
65
66         [% IF op == 'add_form' || op == 'delete_confirm' || op == 'delete_confirmed' %]
67            [% WRAPPER breadcrumb_item %]
68                 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a>
69             [% END %]
70         [% END %]
71
72         [% IF op == 'add_form' %]
73             [% IF itemtype %]
74                [% WRAPPER breadcrumb_item bc_active= 1 %]
75                     [% tx("Modify item type '{item_type}'", { item_type = itemtype.itemtype }) | html %]
76                 [% END %]
77             [% ELSE %]
78                [% WRAPPER breadcrumb_item bc_active= 1 %]
79                     <span>New item type</span>
80                 [% END %]
81             [% END %]
82         [% END %]
83
84         [% IF op == 'delete_confirm' %]
85             [% IF total %]
86                [% WRAPPER breadcrumb_item bc_active= 1 %]
87                     [% tx("Cannot delete item type '{item_type}'", { item_type = itemtype.itemtype }) | html %]
88                 [% END %]
89             [% ELSE %]
90                [% WRAPPER breadcrumb_item bc_active= 1 %]
91                     [% tx("Confirm deletion of item type '{item_type}'?", { item_type = itemtype.itemtype }) | html %]
92                 [% END %]
93             [% END %]
94         [% END %]
95
96         [% IF op == 'delete_confirmed' %]
97            [% WRAPPER breadcrumb_item bc_active= 1 %]
98                 <span>Data deleted</span>
99             [% END %]
100         [% END %]
101
102         [% IF op == 'list' %]
103            [% WRAPPER breadcrumb_item bc_active= 1 %]
104                 <span>Item types</span>
105             [% END %]
106         [% END %]
107     [% END #/ WRAPPER breadcrumbs %]
108 [% END #/ WRAPPER sub-header.inc %]
109
110 <div class="main container-fluid">
111     <div class="row">
112         <div class="col-sm-10 col-sm-push-2">
113             <main>
114
115 [% IF op == 'list' %]<div id="toolbar" class="btn-toolbar">
116     <a class="btn btn-default" id="newitemtype" href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form"><i class="fa fa-plus"></i> New item type</a>
117 </div>[% END %]
118
119 [% FOREACH m IN messages %]
120     <div class="dialog [% m.type | html %]">
121         [% SWITCH m.code %]
122         [% CASE 'error_on_update' %]
123             <span>An error occurred when updating this item type. Perhaps the value already exists.</span>
124         [% CASE 'error_on_insert' %]
125             <span>An error occurred when inserting this item type. Perhaps the value already exists.</span>
126         [% CASE 'error_on_delete' %]
127             <span>An error occurred when deleting this item type. Check the logs for details.</span>
128         [% CASE 'success_on_update' %]
129             <span>Item type updated successfully.</span>
130         [% CASE 'success_on_insert' %]
131             <span>Item type inserted successfully.</span>
132         [% CASE 'success_on_delete' %]
133             <span>Item type deleted successfully.</span>
134         [% CASE 'already_exists' %]
135             <span>This item type already exists.</span>
136         [% CASE 'cannot_be_deleted' %]
137             <span>Cannot delete this item type. <p><strong>This record is in use</strong>. Deletion is not possible.</p></span>
138         [% CASE %]
139             <span>[% m.code | html %]</span>
140         [% END %]
141     </div>
142 [% END %]
143
144
145 [% IF op == 'add_form' %]
146     [% IF itemtype %]
147         <h1>[% tx("Modify item type '{item_type}'", { item_type = itemtype.itemtype }) | html %]</h1>
148     [% ELSE %]
149         <h1>New item type</h1>
150     [% END %]
151     <form action="/cgi-bin/koha/admin/itemtypes.pl" name="Aform" method="post" id="itemtypeentry">
152         <input type="hidden" name="op" value="add_validate" />
153         <fieldset class="rows">
154             <ol>
155                 [% IF itemtype %]
156                     <li>
157                         <input type="hidden" name="is_a_modif" value="1" />
158                         <span class="label">Item type: </span> <input type="hidden" name="itemtype" value="[% itemtype.itemtype | html %]" />
159                         [% itemtype.itemtype | html %]
160                     </li>
161                 [% ELSE %]
162                     <li>
163                         <label for="itemtype" class="required">Item type: </label>
164                         <input type="text" id="itemtype" name="itemtype" size="10" maxlength="10" required="required" class="focus" /> <span class="required">Required</span>
165                     </li>
166                 [% END %]
167                 <li>
168                     <label for="parent_type">Parent item type: </label>
169                     [% IF !is_a_parent && parent_types %]
170                     <select name="parent_type" id="parent_type">
171                         <option value="">None</option>
172                         [% FOREACH pt IN parent_types %]
173                             [% IF parent_type == pt.itemtype %]
174                                 <option value="[% pt.itemtype | html %]" selected="selected">[% pt.description | html %]</option>
175                             [% ELSE %]
176                                 <option value="[% pt.itemtype | html %]">[% pt.description | html %]</option>
177                             [% END %]
178                         [% END %]
179                     </select>
180                     [% ELSIF is_a_parent %]
181                     <input type="text" id="parent_type" value="[% parent_type | html %]" name="parent_type" size="10" maxlength="10" disabled/>
182                     <p>Is a parent to another type, cannot have a parent</p>
183                     [% ELSE %]
184                     <input type="text" id="parent_type" value="[% parent_type | html %]" name="parent_type" size="10" maxlength="10" disabled/>
185                     <p>No available parent types</p>
186                     [% END %]
187                     <div class="hint">Defining a parent type will apply checkout limits for all children as described on the circulation rules page.</div>
188                 </li>
189                 <li>
190                     <label for="description" class="required">Description: </label>
191                     <input type="text" id="description" name="description" size="48" value="[% itemtype.description | html %]" required="required" /> <span class="required">Required</span>
192                     [% IF can_be_translated %]
193                         <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-solid fa-pencil" aria-hidden="true"></i> Translate into other languages</a>
194                     [% END %]
195                 </li>
196                 <li>
197                     <label for="searchcategory">Search category: </label>
198                     <select id="searchcategory" name="searchcategory">
199                     <option value="">None</option>
200                         [% FOREACH cat IN searchcategory %]
201                             [% IF cat.authorised_value == itemtype.searchcategory %]
202                                 <option value="[% cat.authorised_value | html %]" selected="selected">
203                                     [% cat.lib | html %]
204                                 </option>
205                             [% ELSE %]
206                                 <option value="[% cat.authorised_value | html %]" >
207                                     [% cat.lib | html %]
208                                 </option>
209                             [% END %]
210                         [% END %]
211                     </select>
212                     <div class="hint">
213                         [% IF ( CAN_user_parameters_manage_auth_values ) %]
214                             <span>Options are defined by the authorized value <a target="_blank" href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=ITEMTYPECAT">ITEMTYPECAT</a>.</span>
215                         [% ELSE %]
216                             <span>Options are defined by the authorized value ITEMTYPECAT.</span>
217                         [% END %]
218                     </div>
219                 </li>
220                 [% IF ( Koha.Preference('noItemTypeImages') && Koha.Preference('OpacNoItemTypeImages') ) %]
221                     <li>
222                         <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&amp;searchfield=noItemTypeImages">noItemTypeImages or OpacNoItemTypeImages system preferences</a>
223                     </li>
224                 [% END %]
225             </ol>
226
227             [% UNLESS Koha.Preference('noItemTypeImages') && Koha.Preference('OpacNoItemTypeImages') %]
228                 [% INCLUDE 'admin-icon-selection.inc' context = "itemtype" %]
229             [% END %]
230
231             <ol class="oladditemtype">
232                 <li>
233                     <label for="hideinopac">Hide in OPAC: </label>
234                     [% IF ( itemtype.hideinopac ) %]
235                         <input type="checkbox" id="hideinopac" name="hideinopac" checked="checked" value="1" />
236                     [% ELSE %]
237                         <input type="checkbox" id="hideinopac" name="hideinopac" value="1" />
238                     [% END %]
239                     <span class="hint">If checked, items of this type will be hidden as filters in OPAC's advanced search.</span>
240                 </li>
241                 <li>
242                     <label for="notforloan">Not for loan: </label>
243                         [% IF itemtype.notforloan %]
244                             <input type="checkbox" id="notforloan" name="notforloan" checked="checked" value="1" />
245                         [% ELSE %]
246                             <input type="checkbox" id="notforloan" name="notforloan" value="1" />
247                         [% END %]
248                         <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>
249                 </li>
250                 <li>
251                     <label for="automatic_checkin">Automatic check-in: </label>
252                         [% IF itemtype.automatic_checkin %]
253                             <input type="checkbox" id="automatic_checkin" name="automatic_checkin" checked="checked" value="1" />
254                         [% ELSE %]
255                             <input type="checkbox" id="automatic_checkin" name="automatic_checkin" value="1" />
256                         [% END %]
257                         <span class="hint">If checked, items will be automatically checked in once they've reached their due date. This feature requires the <code>misc/cronjobs/automatic_checkin.pl</code> cronjob. Ask your system administrator to schedule it.</span>
258                 </li>
259                 <li>
260                     <label for="rentalcharge">Rental charge: </label>
261                     <input type="text" id="rentalcharge" name="rentalcharge" size="10" value="[% itemtype.rentalcharge | $Price on_editing => 1 %]" min="0" />
262                     <div class="hint">This fee is charged once per checkout/renewal per item</div>
263                 </li>
264                 <li>
265                     <label for="rentalcharge_daily">Daily rental charge: </label>
266                     <input type="text" id="rentalcharge_daily" name="rentalcharge_daily" size="10" value="[% itemtype.rentalcharge_daily | $Price on_editing => 1 %]" min="0" />
267                     <div 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.</div>
268                 </li>
269                 <li>
270                     <label for="rentalcharge_daily_calendar">Daily rentals use calendar: </label>
271                         [% IF itemtype.rentalcharge_daily_calendar %]
272                             <input type="checkbox" id="rentalcharge_daily_calendar" name="rentalcharge_daily_calendar" checked="checked" value="1" />
273                         [% ELSE %]
274                             <input type="checkbox" id="rentalcharge_daily_calendar" name="rentalcharge_daily_calendar" value="1" />
275                         [% END %]
276                         <span class="hint">If checked, daily charge will be calculated using the calendar to exclude holidays. If not checked, the fee will be calculated based on the number of days until due, directly.</span>
277                 </li>
278                 <li>
279                     <label for="rentalcharge_hourly">Hourly rental charge: </label>
280                     <input type="text" id="rentalcharge_hourly" name="rentalcharge_hourly" size="10" value="[% itemtype.rentalcharge_hourly | $Price on_editing => 1 %]" min="0" />
281                     <div class="hint">This fee is charged at checkout/renewal time for each hour between the checkout/renewal date and due date for loans specified in hours.</div>
282                 </li>
283                 <li>
284                     <label for="rentalcharge_hourly_calendar">Hourly rentals use calendar: </label>
285                         [% IF itemtype.rentalcharge_hourly_calendar %]
286                             <input type="checkbox" id="rentalcharge_hourly_calendar" name="rentalcharge_hourly_calendar" checked="checked" value="1" />
287                         [% ELSE %]
288                             <input type="checkbox" id="rentalcharge_hourly_calendar" name="rentalcharge_hourly_calendar" value="1" />
289                         [% END %]
290                         <span class="hint">If checked, hourly charge will be calculated using the calendar to exclude holidays. If not checked, the fee will be calculated based on the number of hours until due, directly.</span>
291                 </li>
292                 <li>
293                     <label for="defaultreplacecost">Default replacement cost: </label>
294                     <input type="text" id="defaultreplacecost" name="defaultreplacecost" size="10" value="[% itemtype.defaultreplacecost | $Price on_editing => 1 %]" min="0" />
295                 </li>
296                 <li>
297                     <label for="processfee">Processing fee (when lost): </label>
298                     <input type="text" id="processfee" name="processfee" size="10" value="[% itemtype.processfee | $Price on_editing => 1 %]" min="0" />
299                 </li>
300                 <li>
301                     <label for="checkinmsg">Checkin message: </label>
302                     <textarea id="checkinmsg" name="checkinmsg" cols="55" rows="5">[% itemtype.checkinmsg | html %]</textarea>
303                 </li>
304                 <li>
305                     <label for="checkinmsgtype">Checkin message type: </label>
306                     <select id="checkinmsgtype" name="checkinmsgtype">
307                         [% IF itemtype.checkinmsgtype == 'message' %]
308                             <option value="message" selected="selected">Message</option>
309                         [% ELSE %]
310                             <option value="message">Message</option>
311                         [% END %]
312                         [% IF itemtype.checkinmsgtype == 'alert' %]
313                             <option value="alert" selected="selected">Alert</option>
314                         [% ELSE %]
315                             <option value="alert">Alert</option>
316                         [% END %]
317                     </select>
318                 </li>
319                 <li>
320                     <label for="sip_media_type">SIP media type: </label>
321                     <select id="sip_media_type" name="sip_media_type">
322                         <option value=""></option>
323                         [% FOREACH a IN AuthorisedValues.Get('SIP_MEDIA_TYPE') %]
324                             [% IF a.authorised_value == itemtype.sip_media_type %]
325                                 <option value="[% a.authorised_value | html %]" selected="selected">[% a.lib | html %]</option>
326                             [% ELSE %]
327                                 <option value="[% a.authorised_value | html %]">[% a.lib | html %]</option>
328                             [% END %]
329                         [% END %]
330                     </select>
331                 </li>
332                 <li><label for="branches">Library limitation: </label>
333                     <select id="branches" name="branches" multiple size="10">
334                         <option value="">All libraries</option>
335                         [% PROCESS options_for_libraries libraries => Branches.all( selected => itemtype.get_library_limits, unfiltered => 1, do_not_select_my_library => 1 ) %]
336                     </select>
337                     <div class="hint">Select 'All libraries' if all libraries use this item type. Otherwise, select the specific libraries that use this item type.</div>
338                 </li>
339                 <li>
340                     <label for="summary">Summary: </label>
341                    <textarea id="summary" name="summary" cols="55" rows="5">[% itemtype.summary | html %]</textarea>
342                     <div class="hint">Enter a summary that will overwrite the default one in search results lists. Example, for a website itemtype : </div>
343                     <div class="hint"><strong>&lt;a href="[856u]"&gt;open site&lt;/a&gt;</strong> will show the link just below the title</div>
344                 </li>
345             </ol>
346         </fieldset>
347
348         <fieldset class="action">
349             <input type="submit" class="btn btn-primary" value="Save changes" />
350             <a href="/cgi-bin/koha/admin/itemtypes.pl" class="cancel">Cancel</a>
351         </fieldset>
352     </form>
353 [% END %]
354
355 [% IF op == 'delete_confirm' %]
356     <div class="dialog alert">
357         <h1>[% tx("Are you sure you want to delete item type '{item_type}'?", { item_type = itemtype.itemtype }) | html %]</h1>
358         <table>
359             <tr>
360                 <th scope="row">Item type</th>
361                 <td>[% itemtype.itemtype | html %]</td>
362             </tr>
363             <tr><th scope="row">Description</th><td>[% itemtype.translated_description | html %]</td></tr>
364             [% UNLESS Koha.Preference('noItemTypeImages') && Koha.Preference('OpacNoItemTypeImages') %]
365                 <tr>
366                     <th scope="row">Image</th>
367                     <td>
368                         [% SET image_location = itemtype.image_location('intranet') %]
369                         [% IF image_location %]<img src="[% image_location | html %]" alt="" />[% END %]
370                     </td>
371                 </tr>
372             [% END %]
373             <tr><th scope="row">Rental charge</th><td>[% itemtype.rentalcharge | $Price %]</td></tr>
374         </table>
375         <form action="/cgi-bin/koha/admin/itemtypes.pl" method="post">
376             <input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="[% itemtype.itemtype | html %]" />
377             <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this item type</button>
378         </form>
379         <form action="/cgi-bin/koha/admin/itemtypes.pl" method="post">
380             <button type="submit" class="deny"><i class="fa fa-fw fa-times"></i> No, do not delete</button>
381         </form>
382     </div>
383 [% END %]
384
385 [% IF op == 'list' %]
386     <h1>Item types</h1>
387     [% IF itemtypes %]
388     <div class="page-section">
389         <table id="table_item_type">
390           <thead>
391             [% UNLESS Koha.Preference('noItemTypeImages') && Koha.Preference('OpacNoItemTypeImages') %]<th class="noExport">Image</th>[% END %]
392             <th>Description</th>
393             <th>Code</th>
394             <th>Parent code</th>
395             <th>Search category</th>
396             <th>Not for loan</th>
397             <th>Hide in OPAC</th>
398             <th>Rental charge</th>
399             <th>Daily rental charge</th>
400             <th>Hourly rental charge</th>
401             <th>Default replacement cost</th>
402             <th>Processing fee (when lost)</th>
403             <th>Checkin message</th>
404             <th>Library limitations</th>
405             <th>Automatic check-in</th>
406             <th class="noExport NoSort">Actions</th>
407           </thead>
408           [% FOREACH itemtype IN itemtypes %]
409             <tr>
410                 [% UNLESS Koha.Preference('noItemTypeImages') && Koha.Preference('OpacNoItemTypeImages') %]
411                     <td>
412                         [% SET image_location = itemtype.image_location('intranet') %]
413                         [% IF image_location %]<img src="[% image_location | html %]" alt="" />[% ELSE %]&nbsp;[% END %]
414                     </td>
415                 [% END %]
416             <td>
417                 [% IF itemtype.parent_type %]
418                     [% IF itemtype.parent.translated_descriptions.size %]
419                         [% itemtype.parent.description | html %] <span>(default)</span><br/>
420                     [% ELSE %]
421                         [% itemtype.parent.description | html %]
422                     [% END %]
423                     </br>
424                     [% IF itemtype.translated_descriptions.size %]
425                         [% itemtype.description | html %] <span>(default)</span><br/>
426                         [% FOR description IN itemtype.translated_descriptions %]
427                             [% IF description.translation == itemtype.translated_description %]
428                             --    <strong>[% description.translation | html %]</strong>
429                             [% ELSE %]
430                             --    [% description.translation | html %] ([% description.lang | html %])
431                             [% END %]
432                             <br/>
433                         [% END %]
434                     [% ELSE %]
435                     --    [% itemtype.description | html %]
436                     [% END %]
437                 [% ELSE %]
438                     [% IF itemtype.translated_descriptions.size %]
439                         [% itemtype.description | html %] <span>(default)</span><br/>
440                         [% FOR description IN itemtype.translated_descriptions %]
441                             [% IF description.translation == itemtype.translated_description %]
442                                 <strong>[% description.translation | html %]</strong>
443                             [% ELSE %]
444                                 [% description.translation | html %] ([% description.lang | html %])
445                             [% END %]
446                             <br/>
447                         [% END %]
448                     [% ELSE %]
449                         [% itemtype.description | html %]
450                     [% END %]
451                 [% END %]
452             </td>
453             <td>
454               <a href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form&amp;itemtype=[% itemtype.itemtype | uri %]">
455                 [% itemtype.itemtype | html %]
456               </a>
457             </td>
458             <td>
459                 [% itemtype.parent_type | html %]
460             </td>
461             <td>[% AuthorisedValues.GetByCode( 'ITEMTYPECAT', itemtype.searchcategory ) | html %]</td>
462             <td>[% IF ( itemtype.notforloan ) %]Yes[% ELSE %]&nbsp;[% END %]</td>
463             <td>[% IF ( itemtype.hideinopac ) %]Yes[% ELSE %]&nbsp;[% END %]</td>
464             <td>
465             [% UNLESS ( itemtype.notforloan ) %]
466               [% itemtype.rentalcharge | $Price %]
467             [% END %]
468             </td>
469             <td>
470             [% UNLESS ( itemtype.notforloan ) %]
471               [% itemtype.rentalcharge_daily | $Price %]
472             [% END %]
473             </td>
474             <td>
475             [% UNLESS ( itemtype.notforloan ) %]
476               [% itemtype.rentalcharge_hourly | $Price %]
477             [% END %]
478             </td>
479
480             <td>[% itemtype.defaultreplacecost | $Price %]</td>
481             <td>[% itemtype.processfee | $Price %]</td>
482             <td>[% itemtype.checkinmsg | html_line_break | $raw %]</td>
483             <td>
484                 [% SET library_limits = itemtype.library_limits %]
485                 [% IF library_limits.count > 0 %]
486                     [% library_str = "" %]
487                     [% FOREACH library IN library_limits %]
488                         [%- IF loop.first -%]
489                             [% library_str = library.branchname _ " (" _ library.branchcode _ ")" %]
490                         [% ELSE %]
491                             [% library_str = library_str _ "\n" _ library.branchname _ " (" _ library.branchcode _ ")" %]
492                         [% END %]
493                     [% END %]
494                     <span class="library_limitation" title="[% library_str | html %]">
495                         [% IF library_limits.count > 1 %]
496                             <span>[% library_limits.count | html %] library limitations</span>
497                         [% ELSE %]
498                             <span>[% library_limits.count | html %] library limitation</span>
499                         [% END %]
500                 [% ELSE %]
501                     <span>No limitation</span>
502                 [% END %]
503             </td>
504             <td>[% IF ( itemtype.automatic_checkin ) %]Yes[% ELSE %]&nbsp;[% END %]</td>
505             <td class="actions">
506               <a href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form&amp;itemtype=[% itemtype.itemtype | uri %]" class="btn btn-default btn-xs"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a>
507               <a href="/cgi-bin/koha/admin/itemtypes.pl?op=delete_confirm&amp;itemtype=[% itemtype.itemtype | uri %]" class="btn btn-default btn-xs"><i class="fa fa-trash-can"></i> Delete</a>
508             </td>
509           </tr>
510           [% END %]
511         </table>
512     </div>
513     [% ELSE %]
514         <div class="dialog message">There are no itemtypes defined</div>
515     [% END %]
516 [% END %]
517
518             </main>
519         </div> <!-- /.col-sm-10.col-sm-push-2 -->
520
521         <div class="col-sm-2 col-sm-pull-10">
522             <aside>
523                 [% INCLUDE 'admin-menu.inc' %]
524             </aside>
525         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
526      </div> <!-- /.row -->
527
528 [% MACRO jsinclude BLOCK %]
529     [% Asset.js("js/admin-menu.js") | $raw %]
530     [% INCLUDE 'greybox.inc' %]
531     [% INCLUDE 'datatables.inc' %]
532     [% INCLUDE 'columns_settings.inc' %]
533     <script>
534          $(document).ready(function() {
535             var table_settings = [% TablesSettings.GetTableSettings( 'admin', 'itemtypes', 'table_item_type', 'json' ) | $raw %];
536             [% IF ( Koha.Preference('noItemTypeImages') && Koha.Preference('OpacNoItemTypeImages') ) %]
537                 table_settings['columns'].shift(); // Remove item type image column from configuration
538             [% END %]
539
540             $(document).ready(function() {
541                 KohaTable("table_item_type", {
542                 "sPaginationType": "full"
543                 }, table_settings);
544             });
545
546             $( "#itemtypeentry" ).validate({
547                 rules: {
548                     itemtype: { required: true },
549                     description: { required: true },
550                     rentalcharge: { number: true },
551                     rentalcharge_hourly: { number: true },
552                     defaultreplacecost: { number: true },
553                     processfee: { number: true }
554                 }
555             });
556             $("#itemtype").on("blur",function(){
557                 toUC(this);
558             });
559             $(".library_limitation").tooltip();
560             if( $("#icons .tab-pane.active").length < 1 ){
561                 $("#icons a:first").tab("show");
562             }
563          });
564     </script>
565 [% END %]
566
567 [% INCLUDE 'intranet-bottom.inc' %]