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) {
34 var x=f.value.toUpperCase();
39 function isNum(v,maybenull) {
40 var n = new Number(v.value);
44 if (maybenull==0 && v.value=='') {
51 var t = Date.parse(f.value);
61 if (f.itemtype.value.length==0) {
62 _alertString += "\n- " + _("Itemtype missing");
64 if (!(isNotNull(window.document.Aform.description,1))) {
65 _alertString += "\n- " + _("Description missing");
67 if ((!isNum(f.rentalcharge,0)) && f.rentalcharge.value.length > 0) {
68 _alertString += "\n- " + _("Rental charge is not a number");
70 if (_alertString.length==0) {
71 document.Aform.submit();
73 alertString2 = _("Form not submitted because of the following problem(s)");
74 alertString2 += "\n------------------------------------------------------------------------------------\n";
75 alertString2 += _alertString;
79 $(document).ready(function() {
81 $("#table_item_type").dataTable($.extend(true, {}, dataTablesDefaults, {
83 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
85 "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
86 "aaSorting": [[ 2, "asc" ]],
92 <style type="text/css">
93 fieldset.rows div.toptabs li { clear:none;margin-right:.5em;padding-bottom:0;width:auto; }
94 fieldset.rows div.toptabs .ui-tabs-nav li.ui-tabs-selected {background-color : #F4F8F9; }
95 fieldset.rows .ui-tabs-panel { margin-right : 10px; margin-left : 10px;margin-bottom:10px;}
96 fieldset.rows .ui-tabs-nav { margin-left : 10px; }
99 <body id="admin_itemtypes" class="admin">
100 [% INCLUDE 'header.inc' %]
101 [% INCLUDE 'cat-search.inc' %]
103 <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 ) %]
104 [% IF ( itemtype ) %]
105 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Modify item type '[% itemtype %]'
107 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Add item type
110 [% IF ( delete_confirm ) %]
112 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Cannot delete item type '[% itemtype %]'
114 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Delete item type '[% itemtype %]'?
117 [% IF ( delete_confirmed ) %]
118 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> ›Data deleted
121 Item types administration
124 <div id="doc3" class="yui-t2">
130 [% IF ( else ) %]<div id="toolbar" class="btn-toolbar">
131 <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>
134 [% IF ( add_form ) %]
135 [% IF ( itemtype ) %]
136 <h3>Modify item type</h3>
138 <h3>Add item type</h3>
140 <form action="[% script_name %]" name="Aform" method="post">
141 <input type="hidden" name="op" value="add_validate" />
142 <input type="hidden" name="checked" value="0" />
144 <fieldset class="rows">
146 [% IF ( itemtype ) %]
148 <span class="label">Item type: </span> <input type="hidden" name="itemtype" value="[% itemtype %]" />
153 <label for="itemtype">Item type: </label> <input type="text" id="itemtype" name="itemtype" size="10" maxlength="10" onblur="toUC(this)" class="focus" />
157 [% IF ( itemtype ) %]
158 <label for="description">Description: </label><input type="text" id="description" name="description" size="48" value="[% description |html %]" class="focus" /></li>
160 <label for="description">Description: </label><input type="text" id="description" name="description" size="48" value="[% description |html %]" /></li>
162 [% IF ( noItemTypeImages ) %]
163 <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>
165 <div id="icons" class="toptabs" style="clear:both">
166 <h5 style="margin-left:10px;">Choose an icon:</h5>
168 <li><a href="#none">None</a></li>
169 [% FOREACH imageset IN imagesets %]
170 [% IF ( imageset.imagesetactive ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="#[% imageset.imagesetname %]">[% imageset.imagesetname %]</a></li>
172 [% IF ( remote_image ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="#remote">Remote image</a></li>
175 <li><label for="noimage">No image: </label><input type="radio" name="image" id="noimage" value="removeImage" /></li>
177 <br class="clear" /></div>
179 [% FOREACH imageset IN imagesets %]
180 <div id="[% imageset.imagesetname %]"><ul>
181 [% FOREACH image IN imageset.images %]
182 <li style="float: none; display: inline-block; clear : none; width: auto;">
183 <label> [% IF ( image.StaffImageUrl ) %]
184 <img src="[% image.StaffImageUrl %]" alt="[% image.StaffImageUrl %]" title="[% image.StaffImageUrl %]" />
187 [% IF ( image.checked ) %]
188 <input type="radio" name="image" value="[% image.KohaImage %]" checked="checked" />
190 [% IF ( image.KohaImage ) %] <!-- to delete the radio button if there is no image after -->
191 <input type="radio" name="image" value="[% image.KohaImage %]" />
201 <div id="remote"><ul>
202 <li> <label for="remote_image_check"> Remote image:</label>
203 [% IF ( remote_image ) %]
204 <input type="radio" id="remote_image_check" name="image" value="remoteImage" checked="checked" />
206 <input type="radio" id="remote_image_check" name="image" value="remoteImage" />
207 [% END %]<input type="text" name="remoteImage" size="48" maxlength="200" value="[% remote_image %]" onmousedown="document.getElementById('remote_image_check').checked = true;" /> [% IF ( remote_image ) %]
208 <img src="[% remote_image %]" alt="" />
217 <label for="notforloan">Not for loan: </label> [% IF ( notforloan ) %]
218 <input type="checkbox" id="notforloan" name="notforloan" checked="checked" value="1" />
220 <input type="checkbox" id="notforloan" name="notforloan" value="1" />
222 (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)
226 <label for="rentalcharge">Rental charge: </label>
227 <input type="text" id="rentalcharge" name="rentalcharge" size="10" value="[% rentalcharge %]" />
230 <label for="checkinmsg">Checkin message: </label>
231 <textarea id="checkinmsg" name="checkinmsg" cols="55" rows="5">[% checkinmsg %]</textarea>
234 <label for="checkinmsgtype">Checkin message type: </label>
235 <select type="text" id="checkinmsgtype" name="checkinmsgtype">
236 [% IF ( checkinmsgtype == 'message' ) %]
237 <option value="message" selected="selected">Message</option>
239 <option value="message">Message</option>
241 [% IF ( checkinmsgtype == 'alert' ) %]
242 <option value="alert" selected="selected">Alert</option>
244 <option value="alert">Alert</option>
249 <label for="summary">Summary: </label>
250 <textarea id="summary" name="summary" cols="55" rows="5">[% summary %]</textarea>
251 <p>Enter a summary that will overwrite the default one in search results lists. Example, for a website itemtype : </p>
252 <p><b><a href="[856u]">open site</a></b> will show the link just below the title</p>
257 <fieldset class="action">
258 <input type="button" value="Save changes" onclick="Check(this.form)" />
259 <a href="/cgi-bin/koha/admin/itemtypes.pl" class="cancel">Cancel</a>
264 [% IF ( delete_confirm ) %]
265 [% IF ( total ) %]<div class="dialog message">
266 <h3>Cannot delete item type</h3>
267 <p><strong>This record is used [% total %] times</strong>. Deletion is not possible.</p>
268 [% ELSE %]<div class="dialog alert">
269 <h3>Delete item type '[% itemtype %]'?</h3>
273 <th scope="row">Item type</th>
274 <td>[% itemtype %]</td>
277 <tr><th scope="row">Description</th><td>[% description %]</td></tr>
278 <tr><th scope="row">Loan length</th><td>[% loanlength %]</td></tr>
279 <tr><th scope="row">Rental charge</th><td>[% rentalcharge %]</td></tr></table>
280 <form action="[% script_name %]" method="post">
281 <input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="[% itemtype %]" />[% IF ( total ) %]
284 <form action="[% script_name %]" method="post"><input type="submit" class="approve" value="OK" /></form>
286 <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>
293 <h2>Item types administration</h2>
295 <table id="table_item_type">
297 [% UNLESS ( noItemTypeImages ) %]<th>Image</th>[% END %]
300 <th>Not for loan</th>
302 <th>Checkin message</th>
305 [% FOREACH loo IN loop %]
306 [% UNLESS ( loop.odd ) %]
307 <tr class="highlight">
311 [% UNLESS ( noItemTypeImages ) %] <td>[% IF ( loo.imageurl ) %]<img src="[% loo.imageurl %]" alt="" />[% ELSE %] [% END %]</td>[% END %]
313 <a href="[% loo.script_name %]?op=add_form&itemtype=[% loo.itemtype |html %]">
317 <td>[% loo.description %]</td>
318 <td>[% IF ( loo.notforloan ) %]Yes[% ELSE %] [% END %]</td>
320 [% UNLESS ( loo.notforloan ) %]
321 [% loo.rentalcharge %]
324 <td>[% loo.checkinmsg | html_line_break %]</td>
326 <a href="[% loo.script_name %]?op=add_form&itemtype=[% loo.itemtype |html %]">Edit</a>
327 <a href="[% loo.script_name %]?op=delete_confirm&itemtype=[% loo.itemtype |html %]">Delete</a>
332 <div class="dialog message">There are no itemtypes defined</div>
335 <div class="pages">[% pagination_bar %]</div>
344 [% INCLUDE 'admin-menu.inc' %]
347 [% INCLUDE 'intranet-bottom.inc' %]