3 [% USE AuthorisedValues %]
5 [% USE ColumnsSettings %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>Koha › Reports › Lost items</title>
11 [% INCLUDE 'doc-head-close.inc' %]
12 [% Asset.css("css/datatables.css") | $raw %]
15 <body id="rep_itemslost" class="rep">
16 [% INCLUDE 'header.inc' %]
17 [% INCLUDE 'cat-search.inc' %]
19 <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>
21 <div class="main container-fluid">
23 <div class="col-sm-10 col-sm-push-2">
29 [% IF ( get_items ) %]
33 [% items.count | html %] lost items found
40 [% IF csv_profiles.count %]
41 <div class="lostitems-table_table_controls">
42 | <a href="#" class="SelectAll"><i class="fa fa-check"></i> Select all</a> |
43 <a href="#" class="ClearAll"><i class="fa fa-remove"></i> Clear all</a>
44 <span class="itemselection_actions">
46 <a class="itemselection_action_export"><i class="fa fa-download"></i> Export selected items</a>
47 Using the following CSV profile:
48 <select name="csv_profile_id" id="csv_profile_id">
49 [% FOREACH csv_profile IN csv_profiles %]
50 <option value="[% csv_profile.export_format_id | html %]">
51 [% csv_profile.profile | html %]
58 <div class="dialog message">
59 [% IF ( CAN_user_tools_manage_csv_profiles ) %]
60 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."
62 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."
65 <div class="lostitems-table_table_controls">
69 <table id="lostitems-table">
72 [% IF csv_profiles.count %]
73 <th class="NoSort"></th>
78 <th class="title-string">Lost on</th>
81 <th class="title-string">Date last seen</th>
86 <th>Current location</th>
88 <th>Not for loan status</th>
93 [% FOREACH item IN items %]
95 [% IF csv_profiles.count %]
96 <td style="text-align:center;vertical-align:middle">
97 <input type="checkbox" value="[% item.itemnumber | html %]" name="itemnumber" />
101 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber | uri %]" title="[% item.itemnotes | html %]">[% item.biblio.title | html %]</a>
103 <td>[% item.biblio.author | html %]</td>
104 <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) | html %]
105 <td><span title="[% item.itemlost_on | html %]">[% item.itemlost_on | $KohaDates %]</span></td>
107 <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% item.biblionumber | uri %]" title="[% item.itemnotes | html %]">[% item.barcode | html %]</a>
109 <td>[% item.itemcallnumber | html %]</td>
110 <td><span title="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</span></td>
111 <td>[% item.price | html %]</td>
112 <td>[% item.replacementprice | html %]</td>
113 <td>[% Branches.GetName(item.homebranch) | html %]</td>
114 <td>[% ItemTypes.GetDescription(item.effective_itemtype) | html %]</td>
115 <td>[% Branches.GetName(item.holdingbranch) | html %]</td>
116 <td>[% AuthorisedValues.GetByCode( 'LOC', item.location ) | html %]</td>
117 <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) | html %]
118 <td>[% item.itemnotes | html %]</td>
126 <form name="f" action="/cgi-bin/koha/reports/itemslost.pl" method="post">
127 <fieldset class="rows">
130 <li><label for="barcodefilter">Barcode: </label><input type="text" name="barcodefilter" id="barcodefilter" size="6" /></li>
131 <li><label for="branchfilter">Library: </label><select name="branchfilter" id="branchfilter">
132 <option value="">All</option>
133 [% PROCESS options_for_libraries libraries => Branches.all() %]
135 <li><label for="itemtypesfilter">Item type: </label><select name="itemtypesfilter" id="itemtypesfilter">
136 <option value="">All</option>
137 [% FOREACH itemtype IN itemtypes %]
138 <option value="[% itemtype.itemtype | html %]">[% itemtype.translated_description | html %]</option>
143 <label for="loststatusfilter">Lost status: </label>
144 <select name="loststatusfilter" id="loststatusfilter">
145 <option value="">All</option>
146 [% FOREACH l IN AuthorisedValues.GetDescriptionsByKohaField( kohafield => 'items.itemlost') %]
147 [% IF l.authorised_value == lostfilter %]
148 <option value="[% l.authorised_value | html %]" selected="selected">[% l.lib | html %]</option>
150 <option value="[% l.authorised_value | html %]">[% l.lib | html %]</option>
157 <label for="notforloanfilter">Not for loan: </label>
158 <select name="notforloanfilter" id="notforloanfilter">
159 <option value="">All</option>
160 [% FOREACH n IN AuthorisedValues.GetDescriptionsByKohaField( kohafield => 'items.notforloan') %]
161 [% IF n.authorised_value == notforloanfilter %]
162 <option value="[% n.authorised_value | html %]" selected="selected">[% n.lib | html %]</option>
164 <option value="[% n.authorised_value | html %]">[% n.lib | html %]</option>
171 <fieldset class="action"> <input type="submit" value="Submit" />
172 <input type="hidden" name="get_items" value="1" /></fieldset>
178 </div> <!-- /.col-sm-10.col-sm-push-2 -->
180 <div class="col-sm-2 col-sm-pull-10">
182 [% INCLUDE 'reports-menu.inc' %]
184 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
185 </div> <!-- /.row -->
187 [% MACRO jsinclude BLOCK %]
188 [% INCLUDE 'datatables.inc' %]
189 [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
190 [% INCLUDE 'columns_settings.inc' %]
191 [% Asset.js("js/table_filters.js") | $raw %]
192 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
193 <script type='text/javascript'>
194 $(document).ready(function() {
195 var columns_settings = [% ColumnsSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) | $raw %];
196 var lostitems_table = KohaTable("lostitems-table", {
197 "dom": 'B<"clearfix">t',
200 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
201 { "sType": "title-string", "aTargets" : [ "title-string" ] }
205 }, columns_settings, 'with_filters');
207 function itemSelectionBuildExportLink() {
208 var itemnumbers = new Array();
209 $("input[name='itemnumber'][type='checkbox']:checked").each(function() {
210 itemnumbers.push($(this).val());
212 if (itemnumbers.length > 0) {
213 var csv_profile_id = $("#csv_profile_id option:selected").val();
214 var url = '/cgi-bin/koha/reports/itemslost.pl?op=export&csv_profile_id='+csv_profile_id;
215 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
216 $('a.itemselection_action_export').attr('href', url);
223 function itemSelectionBuildActionLinks() {
224 var export_link_ok = itemSelectionBuildExportLink();
225 if (export_link_ok) {
226 $('.itemselection_actions').show();
228 $('.itemselection_actions').hide();
232 itemSelectionBuildActionLinks();
234 $("input[name='itemnumber'][type='checkbox']").change(function() {
235 itemSelectionBuildActionLinks();
237 $("#csv_profile_id").change(function() {
238 itemSelectionBuildActionLinks();
241 $(".SelectAll").on("click",function(e){
243 $("#lostitems-table").checkCheckboxes();
244 itemSelectionBuildActionLinks();
247 $(".ClearAll").on("click",function(e){
249 $("#lostitems-table").unCheckCheckboxes();
250 itemSelectionBuildActionLinks();
256 [% INCLUDE 'intranet-bottom.inc' %]