+[% USE Koha %]
+[% USE AuthorisedValues %]
+[% USE Price %]
[% INCLUDE 'doc-head-open.inc' %]
-<title>Koha › Administration › Item types [% IF ( add_form ) %]›
+<title>Koha › Administration › Item types [% IF op == 'add_form' %]›
[% IF ( itemtype ) %]
-Modify item type '[% itemtype %]'
+Modify item type '[% itemtype.itemtype %]'
[% ELSE %]
Add item type
[% END %]
[% END %]
-[% IF ( delete_confirm ) %]›
+[% IF op == 'delete_confirm' %]›
[% IF ( total ) %]
-Cannot delete item type '[% itemtype %]'
+Cannot delete item type '[% itemtype.itemtype %]'
[% ELSE %]
-Delete item type '[% itemtype %]'?
+Delete item type '[% itemtype.itemtype %]'?
[% END %]
[% END %]
-[% IF ( delete_confirmed ) %]›
+[% IF op == 'delete_confirmed' %]›
Data deleted
[% END %]
</title>
[% INCLUDE 'doc-head-close.inc' %]
-<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
-[% INCLUDE 'datatables-strings.inc' %]
-<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
+<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
+[% INCLUDE 'greybox.inc' %]
+[% INCLUDE 'datatables.inc' %]
<script type="text/javascript">
//<![CDATA[
-
-function isNotNull(f,noalert) {
- if (f.value.length ==0) {
- return false;
- }
- return true;
-}
-
-function toUC(f) {
- var x=f.value.toUpperCase();
- f.value=x;
- return true;
-}
-
-function isNum(v,maybenull) {
-var n = new Number(v.value);
-if (isNaN(n)) {
- return false;
- }
-if (maybenull==0 && v.value=='') {
- return false;
-}
-return true;
-}
-
-function isDate(f) {
- var t = Date.parse(f.value);
- if (isNaN(t)) {
- return false;
- }
-}
-
-function Check(f) {
- var ok=1;
- var _alertString="";
- var alertString2;
- if (f.itemtype.value.length==0) {
- _alertString += "\n- " + _("Itemtype missing");
- }
- if (!(isNotNull(window.document.Aform.description,1))) {
- _alertString += "\n- " + _("Description missing");
- }
- if ((!isNum(f.rentalcharge,0)) && f.rentalcharge.value.length > 0) {
- _alertString += "\n- " + _("Rental charge is not a number");
- }
- if (_alertString.length==0) {
- document.Aform.submit();
- } else {
- alertString2 = _("Form not submitted because of the following problem(s)");
- alertString2 += "\n------------------------------------------------------------------------------------\n";
- alertString2 += _alertString;
- alert(alertString2);
- }
-}
$(document).ready(function() {
$('#icons').tabs();
$("#table_item_type").dataTable($.extend(true, {}, dataTablesDefaults, {
"aoColumnDefs": [
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
],
- "aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
"aaSorting": [[ 2, "asc" ]],
- "iDisplayLength": 10
+ "iDisplayLength": 10,
+ "sPaginationType": "four_button"
}));
+ $( "#itemtypeentry" ).validate({
+ rules: {
+ itemtype: { required: true },
+ description: { required: true },
+ rentalcharge: { number: true }
+ }
+ });
+ $("#itemtype").on("blur",function(){
+ toUC(this);
+ });
});
//]]>
</script>
<style type="text/css">
fieldset.rows div.toptabs li { clear:none;margin-right:.5em;padding-bottom:0;width:auto; }
- fieldset.rows div.toptabs .ui-tabs-nav li.ui-tabs-selected {background-color : #F4F8F9; }
+ fieldset.rows div.toptabs .ui-tabs-nav li.ui-tabs-active {background-color : #F4F8F9; }
fieldset.rows .ui-tabs-panel { margin-right : 10px; margin-left : 10px;margin-bottom:10px;}
fieldset.rows .ui-tabs-nav { margin-left : 10px; }
</style>
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
-<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 ) %]
- [% IF ( itemtype ) %]
-<a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Modify item type '[% itemtype %]'
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › [% IF op == 'add_form' %]
+ [% IF itemtype %]
+<a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Modify item type '[% itemtype.itemtype %]'
[% ELSE %]
<a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Add item type
[% END %]
[% END %]
-[% IF ( delete_confirm ) %]
- [% IF ( total ) %]
-<a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Cannot delete item type '[% itemtype %]'
+[% IF op == 'delete_confirm' %]
+ [% IF total %]
+<a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Cannot delete item type '[% itemtype.itemtype %]'
[% ELSE %]
-<a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Delete item type '[% itemtype %]'?
+<a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> › Delete item type '[% itemtype.itemtype %]'?
[% END %]
[% END %]
-[% IF ( delete_confirmed ) %]
+[% IF op == 'delete_confirmed' %]
<a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a> ›Data deleted
[% END %]
-[% IF ( else ) %]
+[% IF op == 'list' %]
Item types administration
[% END %]</div>
<div id="doc3" class="yui-t2">
-
+
<div id="bd">
<div id="yui-main">
<div class="yui-b">
-[% IF ( else ) %]<div id="toolbar" class="btn-toolbar">
- <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>
-</div>[% END %]
-[% IF ( add_form ) %]
- [% IF ( itemtype ) %]
- <h3>Modify item type</h3>
- [% ELSE %]
- <h3>Add item type</h3>
- [% END %]
-<form action="[% script_name %]" name="Aform" method="post">
- <input type="hidden" name="op" value="add_validate" />
- <input type="hidden" name="checked" value="0" />
-
- <fieldset class="rows">
- <ol>
- [% IF ( itemtype ) %]
- <li>
- <span class="label">Item type</span> <input type="hidden" name="itemtype" value="[% itemtype %]" />
- [% itemtype %]
- </li>
- [% ELSE %]
- <li>
- <label for="itemtype">Item type</label> <input type="text" id="itemtype" name="itemtype" size="10" maxlength="10" onblur="toUC(this)" class="focus" />
- </li>
- [% END %]
- <li>
- [% IF ( itemtype ) %]
- <label for="description">Description</label><input type="text" id="description" name="description" size="48" value="[% description |html %]" class="focus" /></li>
- [% ELSE %]
- <label for="description">Description</label><input type="text" id="description" name="description" size="48" value="[% description |html %]" /></li>
- [% END %]
- [% IF ( noItemTypeImages ) %]
- <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>
- [% ELSE %]</ol>
- <div id="icons" class="toptabs" style="clear:both">
- <h5 style="margin-left:10px;">Choose an icon:</h5>
- <ul>
- <li><a href="#none">None</a></li>
- [% FOREACH imageset IN imagesets %]
- [% IF ( imageset.imagesetactive ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="#[% imageset.imagesetname %]">[% imageset.imagesetname %]</a></li>
- [% END %]
- [% IF ( remote_image ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="#remote">Remote image</a></li>
- </ul>
- <div id="none"><ul>
- <li><label for="noimage">No image: </label><input type="radio" name="image" id="noimage" value="removeImage" /></li>
- </ul>
- <br class="clear" /></div>
+[% IF op == 'list' %]<div id="toolbar" class="btn-toolbar">
+ <a class="btn btn-small" id="newitemtype" href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form"><i class="fa fa-plus"></i> New item type</a>
+</div>[% END %]
- [% FOREACH imageset IN imagesets %]
- <div id="[% imageset.imagesetname %]"><ul>
- [% FOREACH image IN imageset.images %]
- <li style="float: none; display: inline; clear : none; width: auto;">
- <label> [% IF ( image.StaffImageUrl ) %]
- <img src="[% image.StaffImageUrl %]" alt="[% image.StaffImageUrl %]" title="[% image.StaffImageUrl %]" />
- [% ELSE %]
+[% FOREACH m IN messages %]
+ <div class="dialog [% m.type %]">
+ [% SWITCH m.code %]
+ [% CASE 'error_on_update' %]
+ An error occurred when updating this item type. Perhaps the value already exists.
+ [% CASE 'error_on_insert' %]
+ An error occurred when inserting this item type. Perhaps the value already exists.
+ [% CASE 'error_on_delete' %]
+ An error occurred when deleting this item type. Check the logs.
+ [% CASE 'success_on_update' %]
+ Item type updated successfully.
+ [% CASE 'success_on_insert' %]
+ Item type inserted successfully.
+ [% CASE 'success_on_delete' %]
+ Item type deleted successfully.
+ [% CASE 'already_exists' %]
+ This item type already exists.
+ [% CASE 'cannot_be_deleted' %]
+ Cannot delete this item type. <p><strong>This record is used [% m.total %] times</strong>. Deletion is not possible.</p>
+ [% CASE %]
+ [% m.code %]
[% END %]
- [% IF ( image.checked ) %]
- <input type="radio" name="image" value="[% image.KohaImage %]" checked="checked" />
+ </div>
+[% END %]
+
+
+[% IF op == 'add_form' %]
+ [% IF itemtype %]
+ <h3>Modify item type</h3>
[% ELSE %]
- [% IF ( image.KohaImage ) %] <!-- to delete the radio button if there is no image after -->
- <input type="radio" name="image" value="[% image.KohaImage %]" />
- [% END %]
+ <h3>Add item type</h3>
[% END %]
- </label>
- </li>
- [% END %]
- </ul>
- <br class="clear" />
- </div>
- [% END %]
-<div id="remote"><ul>
-<li> <label for="remote_image_check"> Remote image:</label>
- [% IF ( remote_image ) %]
- <input type="radio" id="remote_image_check" name="image" value="remoteImage" checked="checked" />
- [% ELSE %]
- <input type="radio" id="remote_image_check" name="image" value="remoteImage" />
- [% END %]<input type="text" name="remoteImage" size="48" maxlength="200" value="[% remote_image %]" onmousedown="document.getElementById('remote_image_check').checked = true;" /> [% IF ( remote_image ) %]
- <img src="[% remote_image %]" alt="" />
- [% END %]</li>
-</ul>
- <br class="clear" />
-</div>
-[% END %]
-</div>
-<ol>
- <li>
- <label for="notforloan">Not for loan</label> [% IF ( notforloan ) %]
- <input type="checkbox" id="notforloan" name="notforloan" checked="checked" value="1" />
- [% ELSE %]
- <input type="checkbox" id="notforloan" name="notforloan" value="1" />
- [% END %]
- (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)
-
- </li>
- <li>
- <label for="rentalcharge">Rental charge: </label>
- <input type="text" id="rentalcharge" name="rentalcharge" size="10" value="[% rentalcharge %]" />
- </li>
- <li>
- <label for="summary">Summary: </label>
- <textarea id="summary" name="summary" cols="55" rows="5">[% summary %]</textarea>
- <p>Enter a summary that will overwrite the default one in search results lists. Example, for a website itemtype : </p>
- <p><b><a href="[856u]">open site</a></b> will show the link just below the title</p>
- </li>
- </ol>
- </fieldset>
+ <form action="/cgi-bin/koha/admin/itemtypes.pl" name="Aform" method="post" id="itemtypeentry">
+ <input type="hidden" name="op" value="add_validate" />
+ <fieldset class="rows">
+ <ol>
+ [% IF itemtype %]
+ <li>
+ <input type="hidden" name="is_a_modif" value="1" />
+ <span class="label">Item type: </span> <input type="hidden" name="itemtype" value="[% itemtype.itemtype %]" />
+ [% itemtype.itemtype %]
+ </li>
+ [% ELSE %]
+ <li>
+ <label for="itemtype" class="required">Item type: </label>
+ <input type="text" id="itemtype" name="itemtype" size="10" maxlength="10" required="required" /> <span class="required">Required</span>
+ </li>
+ [% END %]
+ <li>
+ <label for="description" class="required">Description: </label>
+ <input type="text" id="description" name="description" size="48" value="[% itemtype.description |html %]" required="required" /> <span class="required">Required</span>
+ [% IF can_be_translated %]
+ <a href="/cgi-bin/koha/admin/localization.pl?entity=itemtypes&code=[% itemtype.itemtype %]" title="Translate item type [% itemtype.itemtype %]" rel="gb_page_center[600,500]"><i class="fa fa-pencil"></i> Translate into other languages</a>
+ [% END %]
+ </li>
+ <li>
+ <span class="label">Search category</span>
+ <select id="searchcategory" name="searchcategory">
+ <option value="">None</option>
+ [% FOREACH cat IN searchcategory %]
+ [% IF cat.authorised_value == itemtype.searchcategory %]
+ <option value="[% cat.authorised_value %]" selected="selected">
+ [% cat.lib %]
+ </option>
+ [% ELSE %]
+ <option value="[% cat.authorised_value %]" >
+ [% cat.lib %]
+ </option>
+ [% END %]
+ [% END %]
+ </select>
+ (Options are defined as the authorized values for the ITEMTYPECAT category)
+ </li>
+ [% IF Koha.Preference('noItemTypeImages') %]
+ <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>
+ [% END %]
+ </ol>
+ [% UNLESS Koha.Preference('noItemTypeImages') %]
+ <div id="icons" class="toptabs" style="clear:both">
+ <h5 style="margin-left:10px;">Choose an icon:</h5>
+ <ul>
+ <li><a href="#none">None</a></li>
+ [% FOREACH imageset IN imagesets %]
+ [% IF ( imageset.imagesetactive ) %]
+ <li class="ui-tabs-active">
+ [% ELSE %]
+ <li>
+ [% END %]
+ <a href="#[% imageset.imagesetname %]">[% imageset.imagesetname %]</a>
+ </li>
+ [% END %]
+ [% IF itemtype.image_location.match('^http') %]<li class="ui-tabs-active">[% ELSE %]<li>[% END %]<a href="#remote">Remote image</a></li>
+ </ul>
+ <div id="none">
+ <ul>
+ <li><label for="noimage">No image: </label><input type="radio" name="image" id="noimage" value="removeImage" /></li>
+ </ul>
+ <br class="clear" />
+ </div>
- <fieldset class="action">
- <input type="button" value="Save changes" onclick="Check(this.form)" />
- <a href="/cgi-bin/koha/admin/itemtypes.pl" class="cancel">Cancel</a>
- </fieldset>
-</form>
-[% END %]
+ [% FOREACH imageset IN imagesets %]
+ <div id="[% imageset.imagesetname %]">
+ <ul>
+ [% FOREACH image IN imageset.images %]
+ <li style="float: none; display: inline-block; clear : none; width: auto;">
+ <label>
+ [% IF image.StaffImageUrl %]
+ <img src="[% image.StaffImageUrl %]" alt="[% image.StaffImageUrl %]" title="[% image.StaffImageUrl %]" />
+ [% END %]
+ [% IF image.checked %]
+ <input type="radio" name="image" value="[% image.KohaImage %]" checked="checked" />
+ [% ELSIF image.KohaImage %] <!-- to delete the radio button if there is no image after -->
+ <input type="radio" name="image" value="[% image.KohaImage %]" />
+ [% END %]
+ </label>
+ </li>
+ [% END %]
+ </ul>
+ <br class="clear" />
+ </div>
+ [% END %]
-[% IF ( delete_confirm ) %]
-[% IF ( total ) %]<div class="dialog message">
-<h3>Cannot delete item type</h3>
-<p><strong>This record is used [% total %] times</strong>. Deletion is not possible.</p>
-[% ELSE %]<div class="dialog alert">
-<h3>Delete item type '[% itemtype %]'?</h3>
+ <div id="remote">
+ <ul>
+ <li>
+ <label for="remote_image_check"> Remote image:</label>
+ [% IF remote_image %]
+ <input type="radio" id="remote_image_check" name="image" value="remoteImage" checked="checked" />
+ [% ELSE %]
+ <input type="radio" id="remote_image_check" name="image" value="remoteImage" />
+ [% END %]
+ <input type="text" name="remoteImage" size="48" maxlength="200" value="[% remote_image %]" onmousedown="document.getElementById('remote_image_check').checked = true;" />
+ [% IF ( remote_image ) %]
+ <img src="[% remote_image %]" alt="" />
+ [% END %]
+ </li>
+ </ul>
+ <br class="clear" />
+ </div>
+ </div>
+ [% END %]
+ <ol>
+ <li>
+ <label for="hideinopac">Hide in OPAC: </label>
+ [% IF ( itemtype.hideinopac ) %]
+ <input type="checkbox" id="hideinopac" name="hideinopac" checked="checked" value="1" />
+ [% ELSE %]
+ <input type="checkbox" id="hideinopac" name="hideinopac" value="1" />
+ [% END %]
+ (if checked, items of this type will be hidden as filters in OPAC's advanced search)
+ </li>
+ <li>
+ <label for="notforloan">Not for loan: </label>
+ [% IF itemtype.notforloan %]
+ <input type="checkbox" id="notforloan" name="notforloan" checked="checked" value="1" />
+ [% ELSE %]
+ <input type="checkbox" id="notforloan" name="notforloan" value="1" />
+ [% END %]
+ (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)
+ </li>
+ <li>
+ <label for="rentalcharge">Rental charge: </label>
+ <input type="text" id="rentalcharge" name="rentalcharge" size="10" value="[% itemtype.rentalcharge %]" />
+ </li>
+ <li>
+ <label for="checkinmsg">Checkin message: </label>
+ <textarea id="checkinmsg" name="checkinmsg" cols="55" rows="5">[% itemtype.checkinmsg %]</textarea>
+ </li>
+ <li>
+ <label for="checkinmsgtype">Checkin message type: </label>
+ <select type="text" id="checkinmsgtype" name="checkinmsgtype">
+ [% IF itemtype.checkinmsgtype == 'message' %]
+ <option value="message" selected="selected">Message</option>
+ [% ELSE %]
+ <option value="message">Message</option>
+ [% END %]
+ [% IF itemtype.checkinmsgtype == 'alert' %]
+ <option value="alert" selected="selected">Alert</option>
+ [% ELSE %]
+ <option value="alert">Alert</option>
+ [% END %]
+ </select>
+ </li>
+ <li>
+ <label for="sip_media_type">SIP media type: </label>
+ <select id="sip_media_type" name="sip_media_type">
+ <option value=""></option>
+ [% FOREACH a IN AuthorisedValues.Get('SIP_MEDIA_TYPE') %]
+ [% IF a.authorised_value == itemtype.sip_media_type %]
+ <option value="[% a.authorised_value %]" selected="selected">[% a.lib %]</option>
+ [% ELSE %]
+ <option value="[% a.authorised_value %]">[% a.lib %]</option>
+ [% END %]
+ [% END %]
+ </select>
+ </li>
+ <li>
+ <label for="summary">Summary: </label>
+ <textarea id="summary" name="summary" cols="55" rows="5">[% itemtype.summary %]</textarea>
+ <p>Enter a summary that will overwrite the default one in search results lists. Example, for a website itemtype : </p>
+ <p><b><a href="[856u]">open site</a></b> will show the link just below the title</p>
+ </li>
+ </ol>
+ </fieldset>
+
+ <fieldset class="action">
+ <input type="submit" value="Save changes" />
+ <a href="/cgi-bin/koha/admin/itemtypes.pl" class="cancel">Cancel</a>
+ </fieldset>
+ </form>
[% END %]
-<table>
- <tr>
- <th scope="row">Item type</th>
- <td>[% itemtype %]</td>
- </tr>
- <tr><th scope="row">Description</th><td>[% description %]</td></tr>
- <tr><th scope="row">Loan length</th><td>[% loanlength %]</td></tr>
-<tr><th scope="row">Rental charge</th><td>[% rentalcharge %]</td></tr></table>
- <form action="[% script_name %]" method="post">
- <input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="[% itemtype %]" />[% IF ( total ) %]
- </form>
-
- <form action="[% script_name %]" method="post"><input type="submit" class="approve" value="OK" /></form>
- [% ELSE %]
- <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>
- [% END %]
-</div>
-
+[% IF op == 'delete_confirm' %]
+ <div class="dialog alert">
+ <h3>Delete item type '[% itemtype.itemtype %]'?</h3>
+ <table>
+ <tr>
+ <th scope="row">Item type</th>
+ <td>[% itemtype.itemtype %]</td>
+ </tr>
+ <tr><th scope="row">Description</th><td>[% itemtype.translated_description %]</td></tr>
+ [% UNLESS Koha.Preference('noItemTypeImages') %]
+ <tr>
+ <th scope="row">Image</th>
+ <td>
+ [% IF itemtype.image_location %]<img src="[% itemtype.image_location %]" alt="" />[% END %]
+ </td>
+ </tr>
+ [% END %]
+ <tr><th scope="row">Rental charge</th><td>[% itemtype.rentalcharge | $Price %]</td></tr>
+ </table>
+ <form action="/cgi-bin/koha/admin/itemtypes.pl" method="post">
+ <input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="[% itemtype.itemtype %]" />
+ <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this item type</button>
+ </form>
+ <form action="/cgi-bin/koha/admin/itemtypes.pl" method="post">
+ <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
+ </form>
+ </div>
[% END %]
-[% IF ( else ) %]
-<h2>Item types administration</h2>
-[% IF ( loop ) %]
-<table id="table_item_type">
- <thead>
- [% UNLESS ( noItemTypeImages ) %]<th>Image</th>[% END %]
- <th>Code</th>
- <th>Description</th>
- <th>Not for loan</th>
- <th>Charge</th>
- <th>Actions</th>
- </thead>
- [% FOREACH loo IN loop %]
- [% UNLESS ( loop.odd ) %]
- <tr class="highlight">
+[% IF op == 'list' %]
+ <h2>Item types administration</h2>
+ [% IF itemtypes %]
+ <table id="table_item_type">
+ <thead>
+ [% UNLESS Koha.Preference('noItemTypeImages') %]<th>Image</th>[% END %]
+ <th>Code</th>
+ <th>Description</th>
+ <th>Search category</th>
+ <th>Not for loan</th>
+ <th>Hide in OPAC</th>
+ <th>Charge</th>
+ <th>Checkin message</th>
+ <th>Actions</th>
+ </thead>
+ [% FOREACH itemtype IN itemtypes %]
+ <tr>
+ [% UNLESS Koha.Preference('noItemTypeImages') %] <td>[% IF itemtype.image_location %]<img src="[% itemtype.image_location %]" alt="" />[% ELSE %] [% END %]</td>[% END %]
+ <td>
+ <a href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=[% itemtype.itemtype |html %]">
+ [% itemtype.itemtype %]
+ </a>
+ </td>
+ <td>
+ [% IF itemtype.translated_descriptions.size %]
+ [% itemtype.description %] (default)<br/>
+ [% FOR description IN itemtype.translated_descriptions %]
+ [% IF description.translation == itemtype.translated_description %]
+ <b>[% description.translation %]</b>
+ [% ELSE %]
+ [% description.translation %] ([% description.lang %])
+ [% END %]
+ <br/>
+ [% END %]
+ [% ELSE %]
+ [% itemtype.description %]
+ [% END %]
+ </td>
+ <td>[% itemtype.searchcategory %]</td>
+ <td>[% IF ( itemtype.notforloan ) %]Yes[% ELSE %] [% END %]</td>
+ <td>[% IF ( itemtype.hideinopac ) %]Yes[% ELSE %] [% END %]</td>
+ <td>
+ [% UNLESS ( itemtype.notforloan ) %]
+ [% itemtype.rentalcharge | $Price %]
+ [% END %]
+ </td>
+ <td>[% itemtype.checkinmsg | html_line_break %]</td>
+ <td class="actions">
+ <a href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=[% itemtype.itemtype |html %]" class="btn btn-mini"><i class="fa fa-pencil"></i> Edit</a>
+ <a href="/cgi-bin/koha/admin/itemtypes.pl?op=delete_confirm&itemtype=[% itemtype.itemtype |html %]" class="btn btn-mini"><i class="fa fa-trash"></i> Delete</a>
+ </td>
+ </tr>
+ [% END %]
+ </table>
[% ELSE %]
- <tr>
+ <div class="dialog message">There are no itemtypes defined</div>
[% END %]
- [% UNLESS ( noItemTypeImages ) %] <td>[% IF ( loo.imageurl ) %]<img src="[% loo.imageurl %]" alt="" />[% ELSE %] [% END %]</td>[% END %]
- <td>
- <a href="[% loo.script_name %]?op=add_form&itemtype=[% loo.itemtype |html %]">
- [% loo.itemtype %]
- </a>
- </td>
- <td>[% loo.description %]</td>
- <td>[% IF ( loo.notforloan ) %]Yes[% ELSE %] [% END %]</td>
- <td>
- [% UNLESS ( loo.notforloan ) %]
- [% loo.rentalcharge %]
- [% END %]
- </td>
- <td>
- <a href="[% loo.script_name %]?op=add_form&itemtype=[% loo.itemtype |html %]">Edit</a>
- <a href="[% loo.script_name %]?op=delete_confirm&itemtype=[% loo.itemtype |html %]">Delete</a>
- </td>
- </tr>
- [% END %]
-</table>[% ELSE %]
-<div class="dialog message">There are no itemtypes defined</div>
[% END %]
-<div class="pages">[% pagination_bar %]</div>
-
-[% END %]
-
-
-
</div>
</div>
<div class="yui-b">