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 <div class="lostitems-table_table_controls">
40 | <a href="#" class="SelectAll"><i class="fa fa-check"></i> Select all</a> |
41 <a href="#" class="ClearAll"><i class="fa fa-remove"></i> Clear all</a>
42 <span class="itemselection_actions">
44 [% IF csv_profiles.count %]
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 %]">[% csv_profile.profile %]</<option>
53 <span class="itemselection_action_export" title="You should create a CSV profile for export_lost_items"><i class="fa fa-download"></i> Export selected items</a>
58 <table id="lostitems-table">
61 <th class="NoSort"></th>
65 <th class="title-string">Lost on</th>
68 <th class="title-string">Date last seen</th>
73 <th>Current location</th>
75 <th>Not for loan status</th>
80 [% FOREACH item IN items %]
82 <td style="text-align:center;vertical-align:middle">
83 <input type="checkbox" value="[% item.itemnumber %]" name="itemnumber" />
86 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]" title="[% item.itemnotes %]">[% item.biblio.title |html %]</a>
88 <td>[% item.biblio.author %]</td>
89 <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) %]
90 <td><span title="[% item.itemlost_on %]">[% item.itemlost_on | $KohaDates %]</span></td>
92 <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% item.biblionumber %]" title="[% item.itemnotes %]">[% item.barcode %]</a>
94 <td>[% item.itemcallnumber %]</td>
95 <td><span title="[% item.datelastseen %]">[% item.datelastseen | $KohaDates %]</span></td>
96 <td>[% item.price %]</td>
97 <td>[% item.replacementprice %]</td>
98 <td>[% Branches.GetName(item.homebranch) %]</td>
99 <td>[% ItemTypes.GetDescription(item.effective_itemtype) %]</td>
100 <td>[% Branches.GetName(item.holdingbranch) %]</td>
101 <td>[% AuthorisedValues.GetByCode( 'LOC', item.location )%]</td>
102 <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %]
103 <td>[% item.itemnotes %]</td>
111 <form name="f" action="/cgi-bin/koha/reports/itemslost.pl" method="post">
112 <fieldset class="rows">
115 <li><label for="barcodefilter">Barcode: </label><input type="text" name="barcodefilter" id="barcodefilter" size="6" /></li>
116 <li><label for="branchfilter">Library: </label><select name="branchfilter" id="branchfilter">
117 <option value="">All</option>
118 [% PROCESS options_for_libraries libraries => Branches.all() %]
120 <li><label for="itemtypesfilter">Item type: </label><select name="itemtypesfilter" id="itemtypesfilter">
121 <option value="">All</option>
122 [% FOREACH itemtype IN itemtypes %]
123 <option value="[% itemtype.itemtype %]">[% itemtype.translated_description %]</option>
128 <label for="loststatusfilter">Lost status: </label>
129 <select name="loststatusfilter" id="loststatusfilter">
130 <option value="">All</option>
131 [% FOREACH l IN AuthorisedValues.GetDescriptionsByKohaField( kohafield => 'items.itemlost') %]
132 [% IF l.authorised_value == lostfilter %]
133 <option value="[% l.authorised_value %]" selected="selected">[% l.lib %]</option>
135 <option value="[% l.authorised_value %]">[% l.lib %]</option>
142 <label for="notforloanfilter">Not for loan: </label>
143 <select name="notforloanfilter" id="notforloanfilter">
144 <option value="">All</option>
145 [% FOREACH n IN AuthorisedValues.GetDescriptionsByKohaField( kohafield => 'items.notforloan') %]
146 [% IF n.authorised_value == notforloanfilter %]
147 <option value="[% n.authorised_value %]" selected="selected">[% n.lib %]</option>
149 <option value="[% n.authorised_value %]">[% n.lib %]</option>
156 <fieldset class="action"> <input type="submit" value="Submit" />
157 <input type="hidden" name="get_items" value="1" /></fieldset>
165 [% INCLUDE 'reports-menu.inc' %]
169 [% MACRO jsinclude BLOCK %]
170 [% INCLUDE 'datatables.inc' %]
171 [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") %]
172 [% INCLUDE 'columns_settings.inc' %]
173 [% Asset.js("js/table_filters.js") %]
174 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
175 <script type='text/javascript'>
176 $(document).ready(function() {
177 var columns_settings = [% ColumnsSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) %];
178 var lostitems_table = KohaTable("lostitems-table", {
179 "dom": 'B<"clearfix">t',
182 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
183 { "sType": "title-string", "aTargets" : [ "title-string" ] }
187 }, columns_settings, 'with_filters');
189 function itemSelectionBuildExportLink() {
190 var itemnumbers = new Array();
191 $("input[name='itemnumber'][type='checkbox']:checked").each(function() {
192 itemnumbers.push($(this).val());
194 if (itemnumbers.length > 0) {
195 var csv_profile_id = $("#csv_profile_id option:selected").val();
196 var url = '/cgi-bin/koha/reports/itemslost.pl?op=export&csv_profile_id='+csv_profile_id;
197 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
198 $('a.itemselection_action_export').attr('href', url);
205 function itemSelectionBuildActionLinks() {
206 var export_link_ok = itemSelectionBuildExportLink();
207 if (export_link_ok) {
208 $('.itemselection_actions').show();
210 $('.itemselection_actions').hide();
214 itemSelectionBuildActionLinks();
216 $("input[name='itemnumber'][type='checkbox']").change(function() {
217 itemSelectionBuildActionLinks();
219 $("#csv_profile_id").change(function() {
220 itemSelectionBuildActionLinks();
223 $(".SelectAll").on("click",function(e){
225 $("#lostitems-table").checkCheckboxes();
226 itemSelectionBuildActionLinks();
229 $(".ClearAll").on("click",function(e){
231 $("#lostitems-table").unCheckCheckboxes();
232 itemSelectionBuildActionLinks();
238 [% INCLUDE 'intranet-bottom.inc' %]