3 [% USE AuthorisedValues %]
5 [% USE TablesSettings %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 <title>Koha › Reports › Lost items</title>
12 [% INCLUDE 'doc-head-close.inc' %]
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 ) %]
32 [% IF csv_profiles.count %]
33 <div class="lostitems-table_table_controls">
34 | <a href="#" class="SelectAll"><i class="fa fa-check"></i> Select all</a> |
35 <a href="#" class="ClearAll"><i class="fa fa-remove"></i> Clear all</a>
36 <span class="itemselection_actions">
38 <a class="itemselection_action_export"><i class="fa fa-download"></i> Export selected items</a>
39 Using the following CSV profile:
40 <select name="csv_profile_id" id="csv_profile_id">
41 [% FOREACH csv_profile IN csv_profiles %]
42 <option value="[% csv_profile.export_format_id | html %]">
43 [% csv_profile.profile | html %]
50 <div class="dialog message">
51 [% IF ( CAN_user_tools_manage_csv_profiles ) %]
52 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."
54 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."
57 <div class="lostitems-table_table_controls">
61 <table id="lostitems-table">
64 [% IF csv_profiles.count %]
65 <th class="NoSort"></th>
70 <th class="title-string">Lost on</th>
73 <th class="title-string">Date last seen</th>
79 <th>Current location</th>
81 <th>Not for loan status</th>
86 [% FOREACH item IN items %]
88 [% IF csv_profiles.count %]
89 <td style="text-align:center;vertical-align:middle">
90 <input type="checkbox" value="[% item.itemnumber | html %]" name="itemnumber" />
94 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber | uri %]">[% item.biblio.title | html %]</a>
96 <td>[% item.biblio.author | html %]</td>
97 <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) | html %]
98 <td><span title="[% item.itemlost_on | html %]">[% item.itemlost_on | $KohaDates %]</span></td>
100 <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% item.biblionumber | uri %]">[% item.barcode | html %]</a>
102 <td>[% item.itemcallnumber | html %]</td>
103 <td><span title="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</span></td>
104 <td>[% item.price | $Price %]</td>
105 <td>[% item.replacementprice | $Price %]</td>
106 <td>[% Branches.GetName(item.homebranch) | html %]</td>
107 <td>[% ItemTypes.GetDescription(item.effective_itemtype) | html %]</td>
108 <td>[% AuthorisedValues.GetByCode( 'CCODE', item.ccode ) | html %]</td>
109 <td>[% Branches.GetName(item.holdingbranch) | html %]</td>
110 <td>[% AuthorisedValues.GetByCode( 'LOC', item.location ) | html %]</td>
111 <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) | html %]
112 <td>[% item.itemnotes | $raw %]</td>
120 <form name="f" action="/cgi-bin/koha/reports/itemslost.pl" method="post">
121 <fieldset class="rows">
124 <li><label for="barcodefilter">Barcode: </label><input type="text" name="barcodefilter" id="barcodefilter" size="6" /></li>
125 <li><label for="branchfilter">Library: </label><select name="branchfilter" id="branchfilter">
126 <option value="">All</option>
127 [% PROCESS options_for_libraries libraries => Branches.all() %]
129 <li><label for="itemtypesfilter">Item type: </label><select name="itemtypesfilter" id="itemtypesfilter">
130 <option value="">All</option>
131 [% FOREACH itemtype IN itemtypes %]
132 <option value="[% itemtype.itemtype | html %]">[% itemtype.translated_description | html %]</option>
137 <label for="loststatusfilter">Lost status: </label>
138 <select name="loststatusfilter" id="loststatusfilter">
139 <option value="">All</option>
140 [% FOREACH l IN AuthorisedValues.GetDescriptionsByKohaField( kohafield => 'items.itemlost') %]
141 [% IF l.authorised_value == lostfilter %]
142 <option value="[% l.authorised_value | html %]" selected="selected">[% l.lib | html %]</option>
144 <option value="[% l.authorised_value | html %]">[% l.lib | html %]</option>
151 <label for="notforloanfilter">Not for loan: </label>
152 <select name="notforloanfilter" id="notforloanfilter">
153 <option value="">All</option>
154 [% FOREACH n IN AuthorisedValues.GetDescriptionsByKohaField( kohafield => 'items.notforloan') %]
155 [% IF n.authorised_value == notforloanfilter %]
156 <option value="[% n.authorised_value | html %]" selected="selected">[% n.lib | html %]</option>
158 <option value="[% n.authorised_value | html %]">[% n.lib | html %]</option>
165 <fieldset class="action"> <input type="submit" value="Submit" />
166 <input type="hidden" name="get_items" value="1" /></fieldset>
172 </div> <!-- /.col-sm-10.col-sm-push-2 -->
174 <div class="col-sm-2 col-sm-pull-10">
176 [% INCLUDE 'reports-menu.inc' %]
178 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
179 </div> <!-- /.row -->
181 [% MACRO jsinclude BLOCK %]
182 [% INCLUDE 'datatables.inc' %]
183 [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
184 [% INCLUDE 'columns_settings.inc' %]
185 [% Asset.js("js/table_filters.js") | $raw %]
186 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
188 $(document).ready(function() {
189 var columns_settings = [% TablesSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) | $raw %];
190 var lostitems_table = KohaTable("lostitems-table", {
193 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
194 { "sType": "title-string", "aTargets" : [ "title-string" ] }
198 }, columns_settings, 'with_filters');
200 function itemSelectionBuildExportLink() {
201 var itemnumbers = new Array();
202 $("input[name='itemnumber'][type='checkbox']:checked").each(function() {
203 itemnumbers.push($(this).val());
205 if (itemnumbers.length > 0) {
206 var csv_profile_id = $("#csv_profile_id option:selected").val();
207 var url = '/cgi-bin/koha/reports/itemslost.pl?op=export&csv_profile_id='+csv_profile_id;
208 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
209 $('a.itemselection_action_export').attr('href', url);
216 function itemSelectionBuildActionLinks() {
217 var export_link_ok = itemSelectionBuildExportLink();
218 if (export_link_ok) {
219 $('.itemselection_actions').show();
221 $('.itemselection_actions').hide();
225 itemSelectionBuildActionLinks();
227 $("input[name='itemnumber'][type='checkbox']").change(function() {
228 itemSelectionBuildActionLinks();
230 $("#csv_profile_id").change(function() {
231 itemSelectionBuildActionLinks();
234 $(".SelectAll").on("click",function(e){
236 $("#lostitems-table").checkCheckboxes();
237 itemSelectionBuildActionLinks();
240 $(".ClearAll").on("click",function(e){
242 $("#lostitems-table").unCheckCheckboxes();
243 itemSelectionBuildActionLinks();
249 [% INCLUDE 'intranet-bottom.inc' %]