1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Administration › Item types [% IF ( add_form ) %]›
4 Modify item type '[% itemtype %]'
9 [% IF ( delete_confirm ) %]›
11 Cannot delete item type '[% itemtype %]'
13 Delete item type '[% itemtype %]'?
16 [% IF ( delete_confirmed ) %]›
20 [% INCLUDE 'doc-head-close.inc' %]
21 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
22 [% INCLUDE 'datatables.inc' %]
23 <script type="text/javascript">
26 function isNotNull(f,noalert) {
27 if (f.value.length ==0) {
33 function isNum(v,maybenull) {
34 var n = new Number(v.value);
38 if (maybenull==0 && v.value=='') {
45 var t = Date.parse(f.value);
55 if (f.itemtype.value.length==0) {
56 _alertString += "\n- " + _("Itemtype missing");
58 if (!(isNotNull(window.document.Aform.description,1))) {
59 _alertString += "\n- " + _("Description missing");
61 if ((!isNum(f.rentalcharge,0)) && f.rentalcharge.value.length > 0) {
62 _alertString += "\n- " + _("Rental charge is not a number");
64 if (_alertString.length==0) {
65 document.Aform.submit();
67 alertString2 = _("Form not submitted because of the following problem(s)");
68 alertString2 += "\n------------------------------------------------------------------------------------\n";
69 alertString2 += _alertString;
73 $(document).ready(function() {
75 $("#table_item_type").dataTable($.extend(true, {}, dataTablesDefaults, {
77 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
79 "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
80 "aaSorting": [[ 2, "asc" ]],
86 <style type="text/css">
87 fieldset.rows div.toptabs li { clear:none;margin-right:.5em;padding-bottom:0;width:auto; }
88 fieldset.rows div.toptabs .ui-tabs-nav li.ui-tabs-selected {background-color : #F4F8F9; }
89 fieldset.rows .ui-tabs-panel { margin-right : 10px; margin-left : 10px;margin-bottom:10px;}
90 fieldset.rows .ui-tabs-nav { margin-left : 10px; }
93 <body id="admin_itemtypes" class="admin">
94 [% INCLUDE 'header.inc' %]
95 [% INCLUDE 'cat-search.inc' %]
97 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › [% IF ( add_form ) %]
99 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Modify item type '[% itemtype %]'
101 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Add item type
104 [% IF ( delete_confirm ) %]
106 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Cannot delete item type '[% itemtype %]'
108 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Delete item type '[% itemtype %]'?
111 [% IF ( delete_confirmed ) %]
112 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> ›Data deleted
115 Item types administration
118 <div id="doc3" class="yui-t2">
124 [% IF ( else ) %]<div id="toolbar" class="btn-toolbar">
125 <a class="btn btn-small" id="newitemtype" href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form"><i class="icon-plus"></i> New item type</a>
128 [% IF ( add_form ) %]
129 [% IF ( itemtype ) %]
130 <h3>Modify item type</h3>
132 <h3>Add item type</h3>
134 <form action="[% script_name %]" name="Aform" method="post">
135 <input type="hidden" name="op" value="add_validate" />
136 <input type="hidden" name="checked" value="0" />
138 <fieldset class="rows">
140 [% IF ( itemtype ) %]
142 <span class="label">Item type: </span> <input type="hidden" name="itemtype" value="[% itemtype %]" />
147 <label for="itemtype">Item type: </label> <input type="text" id="itemtype" name="itemtype" size="10" maxlength="10" onblur="toUC(this)" class="focus" />
151 [% IF ( itemtype ) %]
152 <label for="description">Description: </label><input type="text" id="description" name="description" size="48" value="[% description |html %]" class="focus" /></li>
154 <label for="description">Description: </label><input type="text" id="description" name="description" size="48" value="[% description |html %]" /></li>
156 [% IF ( noItemTypeImages ) %]
157 <li><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></li></ol>
159 <div id="icons" class="toptabs" style="clear:both">
160 <h5 style="margin-left:10px;">Choose an icon:</h5>
162 <li><a href="#none">None</a></li>
163 [% FOREACH imageset IN imagesets %]
164 [% IF ( imageset.imagesetactive ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="#[% imageset.imagesetname %]">[% imageset.imagesetname %]</a></li>
166 [% IF ( remote_image ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="#remote">Remote image</a></li>
169 <li><label for="noimage">No image: </label><input type="radio" name="image" id="noimage" value="removeImage" /></li>
171 <br class="clear" /></div>
173 [% FOREACH imageset IN imagesets %]
174 <div id="[% imageset.imagesetname %]"><ul>
175 [% FOREACH image IN imageset.images %]
176 <li style="float: none; display: inline-block; clear : none; width: auto;">
177 <label> [% IF ( image.StaffImageUrl ) %]
178 <img src="[% image.StaffImageUrl %]" alt="[% image.StaffImageUrl %]" title="[% image.StaffImageUrl %]" />
181 [% IF ( image.checked ) %]
182 <input type="radio" name="image" value="[% image.KohaImage %]" checked="checked" />
184 [% IF ( image.KohaImage ) %] <!-- to delete the radio button if there is no image after -->
185 <input type="radio" name="image" value="[% image.KohaImage %]" />
195 <div id="remote"><ul>
196 <li> <label for="remote_image_check"> Remote image:</label>
197 [% IF ( remote_image ) %]
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" />
201 [% END %]<input type="text" name="remoteImage" size="48" maxlength="200" value="[% remote_image %]" onmousedown="document.getElementById('remote_image_check').checked = true;" /> [% IF ( remote_image ) %]
202 <img src="[% remote_image %]" alt="" />
211 <label for="notforloan">Not for loan: </label> [% IF ( notforloan ) %]
212 <input type="checkbox" id="notforloan" name="notforloan" checked="checked" value="1" />
214 <input type="checkbox" id="notforloan" name="notforloan" value="1" />
216 (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)
220 <label for="rentalcharge">Rental charge: </label>
221 <input type="text" id="rentalcharge" name="rentalcharge" size="10" value="[% rentalcharge %]" />
224 <label for="checkinmsg">Checkin message: </label>
225 <textarea id="checkinmsg" name="checkinmsg" cols="55" rows="5">[% checkinmsg %]</textarea>
228 <label for="checkinmsgtype">Checkin message type: </label>
229 <select type="text" id="checkinmsgtype" name="checkinmsgtype">
230 [% IF ( checkinmsgtype == 'message' ) %]
231 <option value="message" selected="selected">Message</option>
233 <option value="message">Message</option>
235 [% IF ( checkinmsgtype == 'alert' ) %]
236 <option value="alert" selected="selected">Alert</option>
238 <option value="alert">Alert</option>
243 <label for="summary">Summary: </label>
244 <textarea id="summary" name="summary" cols="55" rows="5">[% summary %]</textarea>
245 <p>Enter a summary that will overwrite the default one in search results lists. Example, for a website itemtype : </p>
246 <p><b><a href="[856u]">open site</a></b> will show the link just below the title</p>
251 <fieldset class="action">
252 <input type="button" value="Save changes" onclick="Check(this.form)" />
253 <a href="/cgi-bin/koha/admin/itemtypes.pl" class="cancel">Cancel</a>
258 [% IF ( delete_confirm ) %]
259 [% IF ( total ) %]<div class="dialog message">
260 <h3>Cannot delete item type</h3>
261 <p><strong>This record is used [% total %] times</strong>. Deletion is not possible.</p>
262 [% ELSE %]<div class="dialog alert">
263 <h3>Delete item type '[% itemtype %]'?</h3>
267 <th scope="row">Item type</th>
268 <td>[% itemtype %]</td>
271 <tr><th scope="row">Description</th><td>[% description %]</td></tr>
272 <tr><th scope="row">Loan length</th><td>[% loanlength %]</td></tr>
273 <tr><th scope="row">Rental charge</th><td>[% rentalcharge %]</td></tr></table>
274 <form action="[% script_name %]" method="post">
275 <input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="[% itemtype %]" />[% IF ( total ) %]
278 <form action="[% script_name %]" method="post"><input type="submit" class="approve" value="OK" /></form>
280 <input type="submit" class="approve" value="Delete this Item Type" /></form> <form action="[% script_name %]" method="post"><input type="submit" class="deny" value="Do Not Delete" /></form>
287 <h2>Item types administration</h2>
289 <table id="table_item_type">
291 [% UNLESS ( noItemTypeImages ) %]<th>Image</th>[% END %]
294 <th>Not for loan</th>
296 <th>Checkin message</th>
299 [% FOREACH loo IN loop %]
300 [% UNLESS ( loop.odd ) %]
301 <tr class="highlight">
305 [% UNLESS ( noItemTypeImages ) %] <td>[% IF ( loo.imageurl ) %]<img src="[% loo.imageurl %]" alt="" />[% ELSE %] [% END %]</td>[% END %]
307 <a href="[% loo.script_name %]?op=add_form&itemtype=[% loo.itemtype |html %]">
311 <td>[% loo.description %]</td>
312 <td>[% IF ( loo.notforloan ) %]Yes[% ELSE %] [% END %]</td>
314 [% UNLESS ( loo.notforloan ) %]
315 [% loo.rentalcharge %]
318 <td>[% loo.checkinmsg | html_line_break %]</td>
320 <a href="[% loo.script_name %]?op=add_form&itemtype=[% loo.itemtype |html %]">Edit</a>
321 <a href="[% loo.script_name %]?op=delete_confirm&itemtype=[% loo.itemtype |html %]">Delete</a>
326 <div class="dialog message">There are no itemtypes defined</div>
329 <div class="pages">[% pagination_bar %]</div>
338 [% INCLUDE 'admin-menu.inc' %]
341 [% INCLUDE 'intranet-bottom.inc' %]