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