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 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
22 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.pager.js"></script>
23 <script type="text/javascript" id="js">$(document).ready(function() {
24 // call the tablesorter plugin
25 $("#table_item_type").tablesorter({
27 headers: { 0: { sorter: false},5: { sorter: false}}
28 }).tablesorterPager({container: $("#pagertable_item_type"),positionFixed: false,size: 10});
31 <script type="text/javascript">
34 function isNotNull(f,noalert) {
35 if (f.value.length ==0) {
42 var x=f.value.toUpperCase();
47 function isNum(v,maybenull) {
48 var n = new Number(v.value);
52 if (maybenull==0 && v.value=='') {
59 var t = Date.parse(f.value);
69 if (f.itemtype.value.length==0) {
70 _alertString += "\n- " + _("Itemtype missing");
72 if (!(isNotNull(window.document.Aform.description,1))) {
73 _alertString += "\n- " + _("Description missing");
75 if ((!isNum(f.rentalcharge,0)) && f.rentalcharge.value.length > 0) {
76 _alertString += "\n- " + _("Rental charge is not a number");
78 if (_alertString.length==0) {
79 document.Aform.submit();
81 alertString2 = _("Form not submitted because of the following problem(s)");
82 alertString2 += "\n------------------------------------------------------------------------------------\n";
83 alertString2 += _alertString;
87 $(document).ready(function() {
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">
131 <script type="text/javascript">
134 // prepare DOM for YUI Toolbar
136 $(document).ready(function() {
140 // YUI Toolbar Functions
142 function yuiToolbar() {
143 new YAHOO.widget.Button("newitemtype");
149 <li><a id="newitemtype" href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form">New item type</a></li>
150 </ul></div>[% ELSE %] [% END %]
152 [% IF ( add_form ) %]
153 [% IF ( itemtype ) %]
154 <h3>Modify item type</h3>
156 <h3>Add item type</h3>
158 <form action="[% script_name %]" name="Aform" method="post">
159 <input type="hidden" name="op" value="add_validate" />
160 <input type="hidden" name="checked" value="0" />
162 <fieldset class="rows">
164 [% IF ( itemtype ) %]
166 <span class="label">Item type</span> <input type="hidden" name="itemtype" value="[% itemtype %]" />
171 <label for="itemtype">Item type</label> <input type="text" id="itemtype" name="itemtype" size="10" maxlength="10" onblur="toUC(this)" class="focus" />
175 [% IF ( itemtype ) %]
176 <label for="description">Description</label><input type="text" id="description" name="description" size="48" value="[% description |html %]" class="focus" /></li>
178 <label for="description">Description</label><input type="text" id="description" name="description" size="48" value="[% description |html %]" /></li>
180 [% IF ( noItemTypeImages ) %]
181 <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>
183 <div id="icons" class="toptabs" style="clear:both">
184 <h5 style="margin-left:10px;">Choose an icon:</h5>
186 <li><a href="#none">None</a></li>
187 [% FOREACH imageset IN imagesets %]
188 [% IF ( imageset.imagesetactive ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="#[% imageset.imagesetname %]">[% imageset.imagesetname %]</a></li>
190 [% IF ( remote_image ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="#remote">Remote image</a></li>
193 <li><label for="noimage">No image: </label><input type="radio" name="image" id="noimage" value="removeImage" /></li>
195 <br class="clear" /></div>
197 [% FOREACH imageset IN imagesets %]
198 <div id="[% imageset.imagesetname %]"><ul>
199 [% FOREACH image IN imageset.images %]
200 <li style="float: none; display: inline; clear : none; width: auto;">
201 <label> [% IF ( image.StaffImageUrl ) %]
202 <img src="[% image.StaffImageUrl %]" alt="[% image.StaffImageUrl %]" title="[% image.StaffImageUrl %]" />
205 [% IF ( image.checked ) %]
206 <input type="radio" name="image" value="[% image.KohaImage %]" checked="checked" />
208 [% IF ( image.KohaImage ) %] <!-- to delete the radio button if there is no image after -->
209 <input type="radio" name="image" value="[% image.KohaImage %]" />
219 <div id="remote"><ul>
220 <li> <label for="remote_image_check"> Remote image:</label>
221 [% IF ( remote_image ) %]
222 <input type="radio" id="remote_image_check" name="image" value="remoteImage" checked="checked" />
224 <input type="radio" id="remote_image_check" name="image" value="remoteImage" />
225 [% END %]<input type="text" name="remoteImage" size="48" maxlength="200" value="[% remote_image %]" onmousedown="document.getElementById('remote_image_check').checked = true;" /> [% IF ( remote_image ) %]
226 <img src="[% remote_image %]" alt="" />
235 <label for="notforloan">Not for loan</label> [% IF ( notforloan ) %]
236 <input type="checkbox" id="notforloan" name="notforloan" checked="checked" value="1" />
238 <input type="checkbox" id="notforloan" name="notforloan" value="1" />
240 (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)
244 <label for="rentalcharge">Rental charge: </label>
245 <input type="text" id="rentalcharge" name="rentalcharge" size="10" value="[% rentalcharge %]" />
248 <label for="summary">Summary: </label>
249 <textarea id="summary" name="summary" cols="55" rows="5">[% summary %]</textarea>
250 <p>Enter a summary that will overwrite the default one in search results lists. Example, for a website itemtype : </p>
251 <p><b><a href="[856u]">open site</a></b> will show the link just below the title</p>
256 <fieldset class="action">
257 <input type="button" value="Save Changes" onclick="Check(this.form)" />
258 <a href="/cgi-bin/koha/admin/itemtypes.pl" class="cancel">Cancel</a>
263 [% IF ( delete_confirm ) %]
264 [% IF ( total ) %]<div class="dialog message">
265 <h3>Cannot delete item type</h3>
266 <p><strong>This record is used [% total %] times</strong>. Deletion is not possible.</p>
267 [% ELSE %]<div class="dialog alert">
268 <h3>Delete item type '[% itemtype %]'?</h3>
272 <th scope="row">Item type</th>
273 <td>[% itemtype %]</td>
276 <tr><th scope="row">Description</th><td>[% description %]</td></tr>
277 <tr><th scope="row">Loan length</th><td>[% loanlength %]</td></tr>
278 <tr><th scope="row">Rental charge</th><td>[% rentalcharge %]</td></tr></table>
279 <form action="[% script_name %]" method="post">
280 <input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="[% itemtype %]" />[% IF ( total ) %]
283 <form action="[% script_name %]" method="post"><input type="submit" class="approve" value="OK" /></form>
285 <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>
292 <h2>Item types administration</h2>
293 [% IF ( loop ) %]<div id="pagertable_item_type">
294 [% INCLUDE 'table-pager.inc' perpage='10' %]
296 <table id="table_item_type">
298 [% UNLESS ( noItemTypeImages ) %]<th>Image</th>[% END %]
301 <th>Not for loan</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 %]
325 <a href="[% loo.script_name %]?op=add_form&itemtype=[% loo.itemtype |html %]">Edit</a>
326 <a href="[% loo.script_name %]?op=delete_confirm&itemtype=[% loo.itemtype |html %]">Delete</a>
331 <div class="dialog message">There are no itemtypes defined</div>
334 <div class="pages">[% pagination_bar %]</div>
343 [% INCLUDE 'admin-menu.inc' %]
346 [% INCLUDE 'intranet-bottom.inc' %]