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 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
23 [% INCLUDE 'datatables-strings.inc' %]
24 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
25 <script type="text/javascript">
28 function isNotNull(f,noalert) {
29 if (f.value.length ==0) {
36 var x=f.value.toUpperCase();
41 function isNum(v,maybenull) {
42 var n = new Number(v.value);
46 if (maybenull==0 && v.value=='') {
53 var t = Date.parse(f.value);
63 if (f.itemtype.value.length==0) {
64 _alertString += "\n- " + _("Itemtype missing");
66 if (!(isNotNull(window.document.Aform.description,1))) {
67 _alertString += "\n- " + _("Description missing");
69 if ((!isNum(f.rentalcharge,0)) && f.rentalcharge.value.length > 0) {
70 _alertString += "\n- " + _("Rental charge is not a number");
72 if (_alertString.length==0) {
73 document.Aform.submit();
75 alertString2 = _("Form not submitted because of the following problem(s)");
76 alertString2 += "\n------------------------------------------------------------------------------------\n";
77 alertString2 += _alertString;
81 $(document).ready(function() {
83 $("#table_item_type").dataTable($.extend(true, {}, dataTablesDefaults, {
85 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
87 "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
88 "aaSorting": [[ 2, "asc" ]],
94 <style type="text/css">
95 fieldset.rows div.toptabs li { clear:none;margin-right:.5em;padding-bottom:0;width:auto; }
96 fieldset.rows div.toptabs .ui-tabs-nav li.ui-tabs-selected {background-color : #F4F8F9; }
97 fieldset.rows .ui-tabs-panel { margin-right : 10px; margin-left : 10px;margin-bottom:10px;}
98 fieldset.rows .ui-tabs-nav { margin-left : 10px; }
101 <body id="admin_itemtypes" class="admin">
102 [% INCLUDE 'header.inc' %]
103 [% INCLUDE 'cat-search.inc' %]
105 <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 ) %]
106 [% IF ( itemtype ) %]
107 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Modify item type '[% itemtype %]'
109 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Add item type
112 [% IF ( delete_confirm ) %]
114 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Cannot delete item type '[% itemtype %]'
116 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Delete item type '[% itemtype %]'?
119 [% IF ( delete_confirmed ) %]
120 <a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> ›Data deleted
123 Item types administration
126 <div id="doc3" class="yui-t2">
132 [% IF ( else ) %]<div id="toolbar" class="btn-toolbar">
133 <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>
136 [% IF ( add_form ) %]
137 [% IF ( itemtype ) %]
138 <h3>Modify item type</h3>
140 <h3>Add item type</h3>
142 <form action="[% script_name %]" name="Aform" method="post">
143 <input type="hidden" name="op" value="add_validate" />
144 <input type="hidden" name="checked" value="0" />
146 <fieldset class="rows">
148 [% IF ( itemtype ) %]
150 <span class="label">Item type</span> <input type="hidden" name="itemtype" value="[% itemtype %]" />
155 <label for="itemtype">Item type</label> <input type="text" id="itemtype" name="itemtype" size="10" maxlength="10" onblur="toUC(this)" class="focus" />
159 [% IF ( itemtype ) %]
160 <label for="description">Description</label><input type="text" id="description" name="description" size="48" value="[% description |html %]" class="focus" /></li>
162 <label for="description">Description</label><input type="text" id="description" name="description" size="48" value="[% description |html %]" /></li>
164 [% IF ( noItemTypeImages ) %]
165 <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>
167 <div id="icons" class="toptabs" style="clear:both">
168 <h5 style="margin-left:10px;">Choose an icon:</h5>
170 <li><a href="#none">None</a></li>
171 [% FOREACH imageset IN imagesets %]
172 [% IF ( imageset.imagesetactive ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="#[% imageset.imagesetname %]">[% imageset.imagesetname %]</a></li>
174 [% IF ( remote_image ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="#remote">Remote image</a></li>
177 <li><label for="noimage">No image: </label><input type="radio" name="image" id="noimage" value="removeImage" /></li>
179 <br class="clear" /></div>
181 [% FOREACH imageset IN imagesets %]
182 <div id="[% imageset.imagesetname %]"><ul>
183 [% FOREACH image IN imageset.images %]
184 <li style="float: none; display: inline-block; clear : none; width: auto;">
185 <label> [% IF ( image.StaffImageUrl ) %]
186 <img src="[% image.StaffImageUrl %]" alt="[% image.StaffImageUrl %]" title="[% image.StaffImageUrl %]" />
189 [% IF ( image.checked ) %]
190 <input type="radio" name="image" value="[% image.KohaImage %]" checked="checked" />
192 [% IF ( image.KohaImage ) %] <!-- to delete the radio button if there is no image after -->
193 <input type="radio" name="image" value="[% image.KohaImage %]" />
203 <div id="remote"><ul>
204 <li> <label for="remote_image_check"> Remote image:</label>
205 [% IF ( remote_image ) %]
206 <input type="radio" id="remote_image_check" name="image" value="remoteImage" checked="checked" />
208 <input type="radio" id="remote_image_check" name="image" value="remoteImage" />
209 [% END %]<input type="text" name="remoteImage" size="48" maxlength="200" value="[% remote_image %]" onmousedown="document.getElementById('remote_image_check').checked = true;" /> [% IF ( remote_image ) %]
210 <img src="[% remote_image %]" alt="" />
219 <label for="notforloan">Not for loan</label> [% IF ( notforloan ) %]
220 <input type="checkbox" id="notforloan" name="notforloan" checked="checked" value="1" />
222 <input type="checkbox" id="notforloan" name="notforloan" value="1" />
224 (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)
228 <label for="rentalcharge">Rental charge: </label>
229 <input type="text" id="rentalcharge" name="rentalcharge" size="10" value="[% rentalcharge %]" />
232 <label for="summary">Summary: </label>
233 <textarea id="summary" name="summary" cols="55" rows="5">[% summary %]</textarea>
234 <p>Enter a summary that will overwrite the default one in search results lists. Example, for a website itemtype : </p>
235 <p><b><a href="[856u]">open site</a></b> will show the link just below the title</p>
240 <fieldset class="action">
241 <input type="button" value="Save changes" onclick="Check(this.form)" />
242 <a href="/cgi-bin/koha/admin/itemtypes.pl" class="cancel">Cancel</a>
247 [% IF ( delete_confirm ) %]
248 [% IF ( total ) %]<div class="dialog message">
249 <h3>Cannot delete item type</h3>
250 <p><strong>This record is used [% total %] times</strong>. Deletion is not possible.</p>
251 [% ELSE %]<div class="dialog alert">
252 <h3>Delete item type '[% itemtype %]'?</h3>
256 <th scope="row">Item type</th>
257 <td>[% itemtype %]</td>
260 <tr><th scope="row">Description</th><td>[% description %]</td></tr>
261 <tr><th scope="row">Loan length</th><td>[% loanlength %]</td></tr>
262 <tr><th scope="row">Rental charge</th><td>[% rentalcharge %]</td></tr></table>
263 <form action="[% script_name %]" method="post">
264 <input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="[% itemtype %]" />[% IF ( total ) %]
267 <form action="[% script_name %]" method="post"><input type="submit" class="approve" value="OK" /></form>
269 <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>
276 <h2>Item types administration</h2>
278 <table id="table_item_type">
280 [% UNLESS ( noItemTypeImages ) %]<th>Image</th>[% END %]
283 <th>Not for loan</th>
287 [% FOREACH loo IN loop %]
288 [% UNLESS ( loop.odd ) %]
289 <tr class="highlight">
293 [% UNLESS ( noItemTypeImages ) %] <td>[% IF ( loo.imageurl ) %]<img src="[% loo.imageurl %]" alt="" />[% ELSE %] [% END %]</td>[% END %]
295 <a href="[% loo.script_name %]?op=add_form&itemtype=[% loo.itemtype |html %]">
299 <td>[% loo.description %]</td>
300 <td>[% IF ( loo.notforloan ) %]Yes[% ELSE %] [% END %]</td>
302 [% UNLESS ( loo.notforloan ) %]
303 [% loo.rentalcharge %]
307 <a href="[% loo.script_name %]?op=add_form&itemtype=[% loo.itemtype |html %]">Edit</a>
308 <a href="[% loo.script_name %]?op=delete_confirm&itemtype=[% loo.itemtype |html %]">Delete</a>
313 <div class="dialog message">There are no itemtypes defined</div>
316 <div class="pages">[% pagination_bar %]</div>
325 [% INCLUDE 'admin-menu.inc' %]
328 [% INCLUDE 'intranet-bottom.inc' %]