Jonathan Druart
61c832a507
This patch adds a new "Not for loan" status filter to the lost items report. Test plan: 0/ Apply all patches from this patch set 1/ Use the new "Not for loan" filter to search lost items 2/ The table result must be consistent and a new "Not for loan" column should be there 3/ Confirm that you are able to hide/show this column with the column settings tool. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
162 lines
6.3 KiB
Text
162 lines
6.3 KiB
Text
[% USE AuthorisedValues %]
|
|
[% USE Branches %]
|
|
[% USE ColumnsSettings %]
|
|
[% USE KohaDates %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Reports › Lost items</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
|
|
</head>
|
|
|
|
<body id="rep_itemslost" class="rep">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'cat-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>[% IF ( get_items ) %] › <a href="/cgi-bin/koha/reports/itemslost.pl">Lost items</a> › Results[% ELSE %] › Lost items[% END %]</div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
<h1>Lost items</h1>
|
|
|
|
[% IF ( get_items ) %]
|
|
|
|
<div class="results">
|
|
[% IF items.count%]
|
|
[% items.count %] lost items found
|
|
[% ELSE %]
|
|
No lost items found
|
|
[% END %]
|
|
</div>
|
|
|
|
[% IF items.count %]
|
|
<table id="lostitems-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Title</th>
|
|
<th>Author</th>
|
|
<th>Lost code</th>
|
|
<th>Barcode</th>
|
|
<th>Call number</th>
|
|
<th>Date last seen</th>
|
|
<th>Price</th>
|
|
<th>Rep.price</th>
|
|
<th>Library</th>
|
|
<th>Item type</th>
|
|
<th>Current location</th>
|
|
<th>Location</th>
|
|
<th>Not for loan status</th>
|
|
<th>Notes</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH item IN items %]
|
|
<tr>
|
|
<td>
|
|
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]" title="[% item.itemnotes %]">[% item.biblio.title |html %]</a>
|
|
</td>
|
|
<td>[% item.biblio.author %]</td>
|
|
<td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) %]
|
|
<td>
|
|
<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% item.biblionumber %]" title="[% item.itemnotes %]">[% item.barcode %]</a>
|
|
</td>
|
|
<td>[% item.itemcallnumber %]</td>
|
|
<td>[% item.datelastseen | $KohaDates %]</td>
|
|
<td>[% item.price %]</td>
|
|
<td>[% item.replacementprice %]</td>
|
|
<td>[% Branches.GetName(item.homebranch) %]</td>
|
|
<td>[% item.effective_itemtype %]</td>
|
|
<td>[% Branches.GetName(item.holdingbranch) %]</td>
|
|
<td>[% item.location %]</td>
|
|
<td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %]
|
|
<td>[% item.itemnotes %]</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
[% END %]
|
|
[% ELSE %]
|
|
|
|
<form name="f" action="/cgi-bin/koha/reports/itemslost.pl" method="post">
|
|
<fieldset class="rows">
|
|
<ol>
|
|
|
|
<li><label for="barcodefilter">Barcode: </label><input type="text" name="barcodefilter" id="barcodefilter" size="6" /></li>
|
|
<li><label for="branchfilter">Library: </label><select name="branchfilter" id="branchfilter">
|
|
<option value="">All</option>
|
|
[% PROCESS options_for_libraries libraries => Branches.all() %]
|
|
</select></li>
|
|
<li><label for="itemtypesfilter">Item type: </label><select name="itemtypesfilter" id="itemtypesfilter">
|
|
<option value="">All</option>
|
|
[% FOREACH itemtype IN itemtypes %]
|
|
<option value="[% itemtype.itemtype %]">[% itemtype.translated_description %]</option>
|
|
[% END %]
|
|
</select></li>
|
|
|
|
<li>
|
|
<label for="loststatusfilter">Lost status: </label>
|
|
<select name="loststatusfilter" id="loststatusfilter">
|
|
<option value="">All</option>
|
|
[% FOREACH l IN AuthorisedValues.GetDescriptionsByKohaField( kohafield => 'items.itemlost') %]
|
|
[% IF l.authorised_value == lostfilter %]
|
|
<option value="[% l.authorised_value %]" selected="selected">[% l.lib %]</option>
|
|
[% ELSE %]
|
|
<option value="[% l.authorised_value %]">[% l.lib %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
|
|
<li>
|
|
<label for="notforloanfilter">Not for loan: </label>
|
|
<select name="notforloanfilter" id="notforloanfilter">
|
|
<option value="">All</option>
|
|
[% FOREACH n IN AuthorisedValues.GetDescriptionsByKohaField( kohafield => 'items.notforloan') %]
|
|
[% IF n.authorised_value == notforloanfilter %]
|
|
<option value="[% n.authorised_value %]" selected="selected">[% n.lib %]</option>
|
|
[% ELSE %]
|
|
<option value="[% n.authorised_value %]">[% n.lib %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
|
|
</ol></fieldset>
|
|
<fieldset class="action"> <input type="submit" value="Submit" />
|
|
<input type="hidden" name="get_items" value="1" /></fieldset>
|
|
</form>
|
|
|
|
[% END %]
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
[% INCLUDE 'reports-menu.inc' %]
|
|
</div>
|
|
</div>
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
[% INCLUDE 'columns_settings.inc' %]
|
|
<script type='text/javascript'>
|
|
$(document).ready(function() {
|
|
var columns_settings = [% ColumnsSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) %];
|
|
var lostitems_table = KohaTable("#lostitems-table", {
|
|
"dom": 'B<"clearfix">t',
|
|
"aaSorting": [],
|
|
"aoColumnDefs": [
|
|
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
|
|
{ "sType": "title-string", "aTargets" : [ "title-string" ] }
|
|
],
|
|
"bPaginate": false,
|
|
}, columns_settings);
|
|
|
|
});
|
|
</script>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|