1 [% USE AuthorisedValues %]
3 [% USE ColumnsSettings %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha › Reports › Lost items</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
12 <body id="rep_itemslost" class="rep">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'cat-search.inc' %]
16 <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>
18 <div id="doc3" class="yui-t2">
26 [% IF ( get_items ) %]
30 [% items.count %] lost items found
37 <div class="lostitems-table_table_controls">
38 | <a href="#" class="SelectAll"><i class="fa fa-check"></i> Select all</a> |
39 <a href="#" class="ClearAll"><i class="fa fa-remove"></i> Clear all</a>
40 <span class="itemselection_actions">
42 [% IF csv_profiles.count %]
43 <a class="itemselection_action_export"><i class="fa fa-download"></i> Export selected items</a>
44 Using the following CSV profile:
45 <select name="csv_profile_id" id="csv_profile_id">
46 [% FOREACH csv_profile IN csv_profiles %]
47 <option value="[% csv_profile.export_format_id %]">[% csv_profile.profile %]</<option>
51 <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>
56 <table id="lostitems-table">
59 <th class="NoSort"></th>
63 <th class="title-string">Lost on</th>
66 <th class="title-string">Date last seen</th>
71 <th>Current location</th>
73 <th>Not for loan status</th>
78 [% FOREACH item IN items %]
80 <td style="text-align:center;vertical-align:middle">
81 <input type="checkbox" value="[% item.itemnumber %]" name="itemnumber" />
84 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]" title="[% item.itemnotes %]">[% item.biblio.title |html %]</a>
86 <td>[% item.biblio.author %]</td>
87 <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) %]
88 <td><span title="[% item.itemlost_on %]"</span>[% item.itemlost_on | $KohaDates %]</span></td>
90 <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% item.biblionumber %]" title="[% item.itemnotes %]">[% item.barcode %]</a>
92 <td>[% item.itemcallnumber %]</td>
93 <td><span title="[% item.datelastseen %]">[% item.datelastseen | $KohaDates %]</span></td>
94 <td>[% item.price %]</td>
95 <td>[% item.replacementprice %]</td>
96 <td>[% Branches.GetName(item.homebranch) %]</td>
97 <td>[% item.effective_itemtype %]</td>
98 <td>[% Branches.GetName(item.holdingbranch) %]</td>
99 <td>[% item.location %]</td>
100 <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %]
101 <td>[% item.itemnotes %]</td>
109 <form name="f" action="/cgi-bin/koha/reports/itemslost.pl" method="post">
110 <fieldset class="rows">
113 <li><label for="barcodefilter">Barcode: </label><input type="text" name="barcodefilter" id="barcodefilter" size="6" /></li>
114 <li><label for="branchfilter">Library: </label><select name="branchfilter" id="branchfilter">
115 <option value="">All</option>
116 [% PROCESS options_for_libraries libraries => Branches.all() %]
118 <li><label for="itemtypesfilter">Item type: </label><select name="itemtypesfilter" id="itemtypesfilter">
119 <option value="">All</option>
120 [% FOREACH itemtype IN itemtypes %]
121 <option value="[% itemtype.itemtype %]">[% itemtype.translated_description %]</option>
126 <label for="loststatusfilter">Lost status: </label>
127 <select name="loststatusfilter" id="loststatusfilter">
128 <option value="">All</option>
129 [% FOREACH l IN AuthorisedValues.GetDescriptionsByKohaField( kohafield => 'items.itemlost') %]
130 [% IF l.authorised_value == lostfilter %]
131 <option value="[% l.authorised_value %]" selected="selected">[% l.lib %]</option>
133 <option value="[% l.authorised_value %]">[% l.lib %]</option>
140 <label for="notforloanfilter">Not for loan: </label>
141 <select name="notforloanfilter" id="notforloanfilter">
142 <option value="">All</option>
143 [% FOREACH n IN AuthorisedValues.GetDescriptionsByKohaField( kohafield => 'items.notforloan') %]
144 [% IF n.authorised_value == notforloanfilter %]
145 <option value="[% n.authorised_value %]" selected="selected">[% n.lib %]</option>
147 <option value="[% n.authorised_value %]">[% n.lib %]</option>
154 <fieldset class="action"> <input type="submit" value="Submit" />
155 <input type="hidden" name="get_items" value="1" /></fieldset>
163 [% INCLUDE 'reports-menu.inc' %]
167 [% MACRO jsinclude BLOCK %]
168 [% INCLUDE 'datatables.inc' %]
169 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter_[% KOHA_VERSION %].js"></script>
170 [% INCLUDE 'columns_settings.inc' %]
171 <script type="text/javascript" src="[% interface %]/[% theme %]/js/table_filters_[% KOHA_VERSION %].js"></script>
172 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
173 <script type='text/javascript'>
174 $(document).ready(function() {
175 var columns_settings = [% ColumnsSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) %];
176 var lostitems_table = KohaTable("lostitems-table", {
177 "dom": 'B<"clearfix">t',
180 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
181 { "sType": "title-string", "aTargets" : [ "title-string" ] }
185 }, columns_settings, 'with_filters');
187 function itemSelectionBuildExportLink() {
188 var itemnumbers = new Array();
189 $("input[name='itemnumber'][type='checkbox']:checked").each(function() {
190 itemnumbers.push($(this).val());
192 if (itemnumbers.length > 0) {
193 var csv_profile_id = $("#csv_profile_id option:selected").val();
194 var url = '/cgi-bin/koha/reports/itemslost.pl?op=export&csv_profile_id='+csv_profile_id;
195 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
196 $('a.itemselection_action_export').attr('href', url);
203 function itemSelectionBuildActionLinks() {
204 var export_link_ok = itemSelectionBuildExportLink();
205 if (export_link_ok) {
206 $('.itemselection_actions').show();
208 $('.itemselection_actions').hide();
212 itemSelectionBuildActionLinks();
214 $("input[name='itemnumber'][type='checkbox']").change(function() {
215 itemSelectionBuildActionLinks();
217 $("#csv_profile_id").change(function() {
218 itemSelectionBuildActionLinks();
221 $(".SelectAll").on("click",function(e){
223 $("#lostitems-table").checkCheckboxes();
224 itemSelectionBuildActionLinks();
227 $(".ClearAll").on("click",function(e){
229 $("#lostitems-table").unCheckCheckboxes();
230 itemSelectionBuildActionLinks();
236 [% INCLUDE 'intranet-bottom.inc' %]