3 [% USE AuthorisedValues %]
5 [% USE ColumnsSettings %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 <title>Koha › Reports › Lost items</title>
12 [% INCLUDE 'doc-head-close.inc' %]
13 [% Asset.css("css/datatables.css") | $raw %]
16 <body id="rep_itemslost" class="rep">
17 [% INCLUDE 'header.inc' %]
18 [% INCLUDE 'cat-search.inc' %]
20 <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>
22 <div class="main container-fluid">
24 <div class="col-sm-10 col-sm-push-2">
30 [% IF ( get_items ) %]
34 [% items.count | html %] lost items found
41 [% IF csv_profiles.count %]
42 <div class="lostitems-table_table_controls">
43 | <a href="#" class="SelectAll"><i class="fa fa-check"></i> Select all</a> |
44 <a href="#" class="ClearAll"><i class="fa fa-remove"></i> Clear all</a>
45 <span class="itemselection_actions">
47 <a class="itemselection_action_export"><i class="fa fa-download"></i> Export selected items</a>
48 Using the following CSV profile:
49 <select name="csv_profile_id" id="csv_profile_id">
50 [% FOREACH csv_profile IN csv_profiles %]
51 <option value="[% csv_profile.export_format_id | html %]">
52 [% csv_profile.profile | html %]
59 <div class="dialog message">
60 [% IF ( CAN_user_tools_manage_csv_profiles ) %]
61 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."
63 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."
66 <div class="lostitems-table_table_controls">
70 <table id="lostitems-table">
73 [% IF csv_profiles.count %]
74 <th class="NoSort"></th>
79 <th class="title-string">Lost on</th>
82 <th class="title-string">Date last seen</th>
87 <th>Current location</th>
89 <th>Not for loan status</th>
94 [% FOREACH item IN items %]
96 [% IF csv_profiles.count %]
97 <td style="text-align:center;vertical-align:middle">
98 <input type="checkbox" value="[% item.itemnumber | html %]" name="itemnumber" />
102 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber | uri %]" title="[% item.itemnotes | html %]">[% item.biblio.title | html %]</a>
104 <td>[% item.biblio.author | html %]</td>
105 <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) | html %]
106 <td><span title="[% item.itemlost_on | html %]">[% item.itemlost_on | $KohaDates %]</span></td>
108 <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% item.biblionumber | uri %]" title="[% item.itemnotes | html %]">[% item.barcode | html %]</a>
110 <td>[% item.itemcallnumber | html %]</td>
111 <td><span title="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</span></td>
112 <td>[% item.price | $Price %]</td>
113 <td>[% item.replacementprice | $Price %]</td>
114 <td>[% Branches.GetName(item.homebranch) | html %]</td>
115 <td>[% ItemTypes.GetDescription(item.effective_itemtype) | html %]</td>
116 <td>[% Branches.GetName(item.holdingbranch) | html %]</td>
117 <td>[% AuthorisedValues.GetByCode( 'LOC', item.location ) | html %]</td>
118 <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) | html %]
119 <td>[% item.itemnotes | html %]</td>
127 <form name="f" action="/cgi-bin/koha/reports/itemslost.pl" method="post">
128 <fieldset class="rows">
131 <li><label for="barcodefilter">Barcode: </label><input type="text" name="barcodefilter" id="barcodefilter" size="6" /></li>
132 <li><label for="branchfilter">Library: </label><select name="branchfilter" id="branchfilter">
133 <option value="">All</option>
134 [% PROCESS options_for_libraries libraries => Branches.all() %]
136 <li><label for="itemtypesfilter">Item type: </label><select name="itemtypesfilter" id="itemtypesfilter">
137 <option value="">All</option>
138 [% FOREACH itemtype IN itemtypes %]
139 <option value="[% itemtype.itemtype | html %]">[% itemtype.translated_description | html %]</option>
144 <label for="loststatusfilter">Lost status: </label>
145 <select name="loststatusfilter" id="loststatusfilter">
146 <option value="">All</option>
147 [% FOREACH l IN AuthorisedValues.GetDescriptionsByKohaField( kohafield => 'items.itemlost') %]
148 [% IF l.authorised_value == lostfilter %]
149 <option value="[% l.authorised_value | html %]" selected="selected">[% l.lib | html %]</option>
151 <option value="[% l.authorised_value | html %]">[% l.lib | html %]</option>
158 <label for="notforloanfilter">Not for loan: </label>
159 <select name="notforloanfilter" id="notforloanfilter">
160 <option value="">All</option>
161 [% FOREACH n IN AuthorisedValues.GetDescriptionsByKohaField( kohafield => 'items.notforloan') %]
162 [% IF n.authorised_value == notforloanfilter %]
163 <option value="[% n.authorised_value | html %]" selected="selected">[% n.lib | html %]</option>
165 <option value="[% n.authorised_value | html %]">[% n.lib | html %]</option>
172 <fieldset class="action"> <input type="submit" value="Submit" />
173 <input type="hidden" name="get_items" value="1" /></fieldset>
179 </div> <!-- /.col-sm-10.col-sm-push-2 -->
181 <div class="col-sm-2 col-sm-pull-10">
183 [% INCLUDE 'reports-menu.inc' %]
185 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
186 </div> <!-- /.row -->
188 [% MACRO jsinclude BLOCK %]
189 [% INCLUDE 'datatables.inc' %]
190 [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
191 [% INCLUDE 'columns_settings.inc' %]
192 [% Asset.js("js/table_filters.js") | $raw %]
193 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
194 <script type='text/javascript'>
195 $(document).ready(function() {
196 var columns_settings = [% ColumnsSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) | $raw %];
197 var lostitems_table = KohaTable("lostitems-table", {
198 "dom": 'B<"clearfix">t',
201 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
202 { "sType": "title-string", "aTargets" : [ "title-string" ] }
206 }, columns_settings, 'with_filters');
208 function itemSelectionBuildExportLink() {
209 var itemnumbers = new Array();
210 $("input[name='itemnumber'][type='checkbox']:checked").each(function() {
211 itemnumbers.push($(this).val());
213 if (itemnumbers.length > 0) {
214 var csv_profile_id = $("#csv_profile_id option:selected").val();
215 var url = '/cgi-bin/koha/reports/itemslost.pl?op=export&csv_profile_id='+csv_profile_id;
216 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
217 $('a.itemselection_action_export').attr('href', url);
224 function itemSelectionBuildActionLinks() {
225 var export_link_ok = itemSelectionBuildExportLink();
226 if (export_link_ok) {
227 $('.itemselection_actions').show();
229 $('.itemselection_actions').hide();
233 itemSelectionBuildActionLinks();
235 $("input[name='itemnumber'][type='checkbox']").change(function() {
236 itemSelectionBuildActionLinks();
238 $("#csv_profile_id").change(function() {
239 itemSelectionBuildActionLinks();
242 $(".SelectAll").on("click",function(e){
244 $("#lostitems-table").checkCheckboxes();
245 itemSelectionBuildActionLinks();
248 $(".ClearAll").on("click",function(e){
250 $("#lostitems-table").unCheckCheckboxes();
251 itemSelectionBuildActionLinks();
257 [% INCLUDE 'intranet-bottom.inc' %]