3 [% USE AuthorisedValues %]
5 [% USE TablesSettings %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 <title>Lost items › Reports › Koha</title>
12 [% INCLUDE 'doc-head-close.inc' %]
15 <body id="rep_itemslost" class="rep">
16 [% INCLUDE 'header.inc' %]
17 [% INCLUDE 'cat-search.inc' %]
19 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
22 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
25 <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
28 [% IF ( get_items ) %]
30 <a href="/cgi-bin/koha/reports/itemslost.pl">Lost items</a>
33 <a href="#" aria-current="page">
39 <a href="#" aria-current="page">
47 <div class="main container-fluid">
49 <div class="col-sm-10 col-sm-push-2">
55 [% IF ( get_items ) %]
58 [% IF csv_profiles.count %]
59 <div class="lostitems-table_table_controls">
60 | <a href="#" class="SelectAll"><i class="fa fa-check"></i> Select all</a> |
61 <a href="#" class="ClearAll"><i class="fa fa-remove"></i> Clear all</a>
62 <span class="itemselection_actions">
64 <a class="itemselection_action_export"><i class="fa fa-download"></i> Export selected items</a>
65 Using the following CSV profile:
66 <select name="csv_profile_id" id="csv_profile_id">
67 [% FOREACH csv_profile IN csv_profiles %]
68 <option value="[% csv_profile.export_format_id | html %]">
69 [% csv_profile.profile | html %]
76 <div class="dialog message">
77 [% IF ( CAN_user_tools_manage_csv_profiles ) %]
78 To enable the export of selected items, <a href="/cgi-bin/koha/tools/csv-profiles.pl">create a CSV profile</a> of the type "SQL" with usage option "Export lost items in report."
80 To enable the export of selected items, your administrator must create a CSV profile of the type "SQL" with usage option "Export lost items in report."
83 <div class="lostitems-table_table_controls">
87 <table id="lostitems-table">
90 [% IF csv_profiles.count %]
91 <th class="NoSort"></th>
99 <th>Date last seen</th>
105 <th>Current library</th>
107 <th>Not for loan status</th>
112 [% FOREACH item IN items %]
114 [% IF csv_profiles.count %]
115 <td style="text-align:center;vertical-align:middle">
116 <input type="checkbox" value="[% item.itemnumber | html %]" name="itemnumber" />
120 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber | uri %]">[% item.biblio.title | html %]</a>
122 <td>[% item.biblio.author | html %]</td>
123 <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) | html %]
124 <td data-order="[% item.itemlost_on | html %]">[% item.itemlost_on | $KohaDates %]</td>
126 <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% item.biblionumber | uri %]">[% item.barcode | html %]</a>
128 <td>[% item.itemcallnumber | html %]</td>
129 <td data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</td>
130 <td>[% item.price | $Price %]</td>
131 <td>[% item.replacementprice | $Price %]</td>
132 <td>[% Branches.GetName(item.homebranch) | html %]</td>
133 <td>[% ItemTypes.GetDescription(item.effective_itemtype) | html %]</td>
134 <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => item.ccode ) | html %]</td>
135 <td>[% Branches.GetName(item.holdingbranch) | html %]</td>
136 <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %]</td>
137 <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) | html %]
138 <td>[% item.itemnotes | $raw %]</td>
146 <form name="f" action="/cgi-bin/koha/reports/itemslost.pl" method="post">
147 <fieldset class="rows">
150 <li><label for="barcodefilter">Barcode: </label><input type="text" name="barcodefilter" id="barcodefilter" size="6" /></li>
151 <li><label for="branchfilter">Library: </label><select name="branchfilter" id="branchfilter">
152 <option value="">All</option>
153 [% PROCESS options_for_libraries libraries => Branches.all() %]
155 <li><label for="itemtypesfilter">Item type: </label><select name="itemtypesfilter" id="itemtypesfilter">
156 <option value="">All</option>
157 [% FOREACH itemtype IN itemtypes %]
158 <option value="[% itemtype.itemtype | html %]">[% itemtype.translated_description | html %]</option>
163 <label for="loststatusfilter">Lost status: </label>
164 <select name="loststatusfilter" id="loststatusfilter">
165 <option value="">All</option>
166 [% FOREACH l IN AuthorisedValues.GetDescriptionsByKohaField( kohafield => 'items.itemlost') %]
167 [% IF l.authorised_value == lostfilter %]
168 <option value="[% l.authorised_value | html %]" selected="selected">[% l.lib | html %]</option>
170 <option value="[% l.authorised_value | html %]">[% l.lib | html %]</option>
177 <label for="notforloanfilter">Not for loan: </label>
178 <select name="notforloanfilter" id="notforloanfilter">
179 <option value="">All</option>
180 [% FOREACH n IN AuthorisedValues.GetDescriptionsByKohaField( kohafield => 'items.notforloan') %]
181 [% IF n.authorised_value == notforloanfilter %]
182 <option value="[% n.authorised_value | html %]" selected="selected">[% n.lib | html %]</option>
184 <option value="[% n.authorised_value | html %]">[% n.lib | html %]</option>
191 <fieldset class="action"> <input type="submit" value="Submit" />
192 <input type="hidden" name="get_items" value="1" /></fieldset>
198 </div> <!-- /.col-sm-10.col-sm-push-2 -->
200 <div class="col-sm-2 col-sm-pull-10">
202 [% INCLUDE 'reports-menu.inc' %]
204 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
205 </div> <!-- /.row -->
207 [% MACRO jsinclude BLOCK %]
208 [% INCLUDE 'datatables.inc' %]
209 [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
210 [% INCLUDE 'columns_settings.inc' %]
211 [% Asset.js("js/table_filters.js") | $raw %]
213 $(document).ready(function() {
214 var columns_settings = [% TablesSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) | $raw %];
215 var lostitems_table = KohaTable("lostitems-table", {
218 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }
222 }, columns_settings, 'with_filters');
224 function itemSelectionBuildExportLink() {
225 var itemnumbers = new Array();
226 $("input[name='itemnumber'][type='checkbox']:checked").each(function() {
227 itemnumbers.push($(this).val());
229 if (itemnumbers.length > 0) {
230 var csv_profile_id = $("#csv_profile_id option:selected").val();
231 var url = '/cgi-bin/koha/reports/itemslost.pl?op=export&csv_profile_id='+csv_profile_id;
232 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
233 $('a.itemselection_action_export').attr('href', url);
240 function itemSelectionBuildActionLinks() {
241 var export_link_ok = itemSelectionBuildExportLink();
242 if (export_link_ok) {
243 $('.itemselection_actions').show();
245 $('.itemselection_actions').hide();
249 itemSelectionBuildActionLinks();
251 $("input[name='itemnumber'][type='checkbox']").change(function() {
252 itemSelectionBuildActionLinks();
254 $("#csv_profile_id").change(function() {
255 itemSelectionBuildActionLinks();
258 $(".SelectAll").on("click",function(e){
260 $("#lostitems-table input:checkbox").each(function(){
261 $(this).prop("checked", true);
263 itemSelectionBuildActionLinks();
266 $(".ClearAll").on("click",function(e){
268 $("#lostitems-table input:checkbox").each(function(){
269 $(this).prop("checked", false);
271 itemSelectionBuildActionLinks();
277 [% INCLUDE 'intranet-bottom.inc' %]