2 [% USE AuthorisedValues %]
4 [% USE ColumnsSettings %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Koha › Reports › Lost items</title>
10 [% INCLUDE 'doc-head-close.inc' %]
11 [% Asset.css("css/datatables.css") %]
14 <body id="rep_itemslost" class="rep">
15 [% INCLUDE 'header.inc' %]
16 [% INCLUDE 'cat-search.inc' %]
18 <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>
20 <div id="doc3" class="yui-t2">
28 [% IF ( get_items ) %]
32 [% items.count %] lost items found
39 [% IF csv_profiles.count %]
40 <div class="lostitems-table_table_controls">
41 | <a href="#" class="SelectAll"><i class="fa fa-check"></i> Select all</a> |
42 <a href="#" class="ClearAll"><i class="fa fa-remove"></i> Clear all</a>
43 <span class="itemselection_actions">
45 <a class="itemselection_action_export"><i class="fa fa-download"></i> Export selected items</a>
46 Using the following CSV profile:
47 <select name="csv_profile_id" id="csv_profile_id">
48 [% FOREACH csv_profile IN csv_profiles %]
49 <option value="[% csv_profile.export_format_id %]">
50 [% csv_profile.profile %]
57 <div class="dialog message">
58 [% IF ( CAN_user_tools_manage_csv_profiles ) %]
59 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."
61 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."
64 <div class="lostitems-table_table_controls">
68 <table id="lostitems-table">
71 [% IF csv_profiles.count %]
72 <th class="NoSort"></th>
77 <th class="title-string">Lost on</th>
80 <th class="title-string">Date last seen</th>
85 <th>Current location</th>
87 <th>Not for loan status</th>
92 [% FOREACH item IN items %]
94 [% IF csv_profiles.count %]
95 <td style="text-align:center;vertical-align:middle">
96 <input type="checkbox" value="[% item.itemnumber %]" name="itemnumber" />
100 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]" title="[% item.itemnotes %]">[% item.biblio.title |html %]</a>
102 <td>[% item.biblio.author %]</td>
103 <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) %]
104 <td><span title="[% item.itemlost_on %]">[% item.itemlost_on | $KohaDates %]</span></td>
106 <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% item.biblionumber %]" title="[% item.itemnotes %]">[% item.barcode %]</a>
108 <td>[% item.itemcallnumber %]</td>
109 <td><span title="[% item.datelastseen %]">[% item.datelastseen | $KohaDates %]</span></td>
110 <td>[% item.price %]</td>
111 <td>[% item.replacementprice %]</td>
112 <td>[% Branches.GetName(item.homebranch) %]</td>
113 <td>[% ItemTypes.GetDescription(item.effective_itemtype) %]</td>
114 <td>[% Branches.GetName(item.holdingbranch) %]</td>
115 <td>[% AuthorisedValues.GetByCode( 'LOC', item.location )%]</td>
116 <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %]
117 <td>[% item.itemnotes %]</td>
125 <form name="f" action="/cgi-bin/koha/reports/itemslost.pl" method="post">
126 <fieldset class="rows">
129 <li><label for="barcodefilter">Barcode: </label><input type="text" name="barcodefilter" id="barcodefilter" size="6" /></li>
130 <li><label for="branchfilter">Library: </label><select name="branchfilter" id="branchfilter">
131 <option value="">All</option>
132 [% PROCESS options_for_libraries libraries => Branches.all() %]
134 <li><label for="itemtypesfilter">Item type: </label><select name="itemtypesfilter" id="itemtypesfilter">
135 <option value="">All</option>
136 [% FOREACH itemtype IN itemtypes %]
137 <option value="[% itemtype.itemtype %]">[% itemtype.translated_description %]</option>
142 <label for="loststatusfilter">Lost status: </label>
143 <select name="loststatusfilter" id="loststatusfilter">
144 <option value="">All</option>
145 [% FOREACH l IN AuthorisedValues.GetDescriptionsByKohaField( kohafield => 'items.itemlost') %]
146 [% IF l.authorised_value == lostfilter %]
147 <option value="[% l.authorised_value %]" selected="selected">[% l.lib %]</option>
149 <option value="[% l.authorised_value %]">[% l.lib %]</option>
156 <label for="notforloanfilter">Not for loan: </label>
157 <select name="notforloanfilter" id="notforloanfilter">
158 <option value="">All</option>
159 [% FOREACH n IN AuthorisedValues.GetDescriptionsByKohaField( kohafield => 'items.notforloan') %]
160 [% IF n.authorised_value == notforloanfilter %]
161 <option value="[% n.authorised_value %]" selected="selected">[% n.lib %]</option>
163 <option value="[% n.authorised_value %]">[% n.lib %]</option>
170 <fieldset class="action"> <input type="submit" value="Submit" />
171 <input type="hidden" name="get_items" value="1" /></fieldset>
179 [% INCLUDE 'reports-menu.inc' %]
183 [% MACRO jsinclude BLOCK %]
184 [% INCLUDE 'datatables.inc' %]
185 [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") %]
186 [% INCLUDE 'columns_settings.inc' %]
187 [% Asset.js("js/table_filters.js") %]
188 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
189 <script type='text/javascript'>
190 $(document).ready(function() {
191 var columns_settings = [% ColumnsSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) %];
192 var lostitems_table = KohaTable("lostitems-table", {
193 "dom": 'B<"clearfix">t',
196 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
197 { "sType": "title-string", "aTargets" : [ "title-string" ] }
201 }, columns_settings, 'with_filters');
203 function itemSelectionBuildExportLink() {
204 var itemnumbers = new Array();
205 $("input[name='itemnumber'][type='checkbox']:checked").each(function() {
206 itemnumbers.push($(this).val());
208 if (itemnumbers.length > 0) {
209 var csv_profile_id = $("#csv_profile_id option:selected").val();
210 var url = '/cgi-bin/koha/reports/itemslost.pl?op=export&csv_profile_id='+csv_profile_id;
211 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
212 $('a.itemselection_action_export').attr('href', url);
219 function itemSelectionBuildActionLinks() {
220 var export_link_ok = itemSelectionBuildExportLink();
221 if (export_link_ok) {
222 $('.itemselection_actions').show();
224 $('.itemselection_actions').hide();
228 itemSelectionBuildActionLinks();
230 $("input[name='itemnumber'][type='checkbox']").change(function() {
231 itemSelectionBuildActionLinks();
233 $("#csv_profile_id").change(function() {
234 itemSelectionBuildActionLinks();
237 $(".SelectAll").on("click",function(e){
239 $("#lostitems-table").checkCheckboxes();
240 itemSelectionBuildActionLinks();
243 $(".ClearAll").on("click",function(e){
245 $("#lostitems-table").unCheckCheckboxes();
246 itemSelectionBuildActionLinks();
252 [% INCLUDE 'intranet-bottom.inc' %]