1 [% USE AuthorisedValues %]
3 [% USE ColumnsSettings %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha › Reports › Lost items</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
13 <body id="rep_itemslost" class="rep">
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'cat-search.inc' %]
17 <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>
19 <div id="doc3" class="yui-t2">
27 [% IF ( get_items ) %]
31 [% items.count %] lost items found
38 <div class="lostitems-table_table_controls">
39 | <a href="#" class="SelectAll"><i class="fa fa-check"></i> Select all</a> |
40 <a href="#" class="ClearAll"><i class="fa fa-remove"></i> Clear all</a>
41 <span class="itemselection_actions">
43 [% IF csv_profiles.count %]
44 <a class="itemselection_action_export"><i class="fa fa-download"></i> Export selected items</a>
45 Using the following CSV profile:
46 <select name="csv_profile_id" id="csv_profile_id">
47 [% FOREACH csv_profile IN csv_profiles %]
48 <option value="[% csv_profile.export_format_id %]">[% csv_profile.profile %]</<option>
52 <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>
57 <table id="lostitems-table">
60 <th class="NoSort"></th>
64 <th class="title-string">Lost on</th>
67 <th class="title-string">Date last seen</th>
72 <th>Current location</th>
74 <th>Not for loan status</th>
79 [% FOREACH item IN items %]
81 <td style="text-align:center;vertical-align:middle">
82 <input type="checkbox" value="[% item.itemnumber %]" name="itemnumber" />
85 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]" title="[% item.itemnotes %]">[% item.biblio.title |html %]</a>
87 <td>[% item.biblio.author %]</td>
88 <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.itemlost', authorised_value => item.itemlost ) %]
89 <td><span title="[% item.itemlost_on %]"</span>[% item.itemlost_on | $KohaDates %]</span></td>
91 <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% item.biblionumber %]" title="[% item.itemnotes %]">[% item.barcode %]</a>
93 <td>[% item.itemcallnumber %]</td>
94 <td><span title="[% item.datelastseen %]">[% item.datelastseen | $KohaDates %]</span></td>
95 <td>[% item.price %]</td>
96 <td>[% item.replacementprice %]</td>
97 <td>[% Branches.GetName(item.homebranch) %]</td>
98 <td>[% ItemTypes.GetDescription(item.effective_itemtype) %]</td>
99 <td>[% Branches.GetName(item.holdingbranch) %]</td>
100 <td>[% AuthorisedValues.GetByCode( 'LOC', item.location )%]</td>
101 <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %]
102 <td>[% item.itemnotes %]</td>
110 <form name="f" action="/cgi-bin/koha/reports/itemslost.pl" method="post">
111 <fieldset class="rows">
114 <li><label for="barcodefilter">Barcode: </label><input type="text" name="barcodefilter" id="barcodefilter" size="6" /></li>
115 <li><label for="branchfilter">Library: </label><select name="branchfilter" id="branchfilter">
116 <option value="">All</option>
117 [% PROCESS options_for_libraries libraries => Branches.all() %]
119 <li><label for="itemtypesfilter">Item type: </label><select name="itemtypesfilter" id="itemtypesfilter">
120 <option value="">All</option>
121 [% FOREACH itemtype IN itemtypes %]
122 <option value="[% itemtype.itemtype %]">[% itemtype.translated_description %]</option>
127 <label for="loststatusfilter">Lost status: </label>
128 <select name="loststatusfilter" id="loststatusfilter">
129 <option value="">All</option>
130 [% FOREACH l IN AuthorisedValues.GetDescriptionsByKohaField( kohafield => 'items.itemlost') %]
131 [% IF l.authorised_value == lostfilter %]
132 <option value="[% l.authorised_value %]" selected="selected">[% l.lib %]</option>
134 <option value="[% l.authorised_value %]">[% l.lib %]</option>
141 <label for="notforloanfilter">Not for loan: </label>
142 <select name="notforloanfilter" id="notforloanfilter">
143 <option value="">All</option>
144 [% FOREACH n IN AuthorisedValues.GetDescriptionsByKohaField( kohafield => 'items.notforloan') %]
145 [% IF n.authorised_value == notforloanfilter %]
146 <option value="[% n.authorised_value %]" selected="selected">[% n.lib %]</option>
148 <option value="[% n.authorised_value %]">[% n.lib %]</option>
155 <fieldset class="action"> <input type="submit" value="Submit" />
156 <input type="hidden" name="get_items" value="1" /></fieldset>
164 [% INCLUDE 'reports-menu.inc' %]
168 [% MACRO jsinclude BLOCK %]
169 [% INCLUDE 'datatables.inc' %]
170 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter_[% KOHA_VERSION %].js"></script>
171 [% INCLUDE 'columns_settings.inc' %]
172 <script type="text/javascript" src="[% interface %]/[% theme %]/js/table_filters_[% KOHA_VERSION %].js"></script>
173 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min_[% KOHA_VERSION %].js"></script>
174 <script type='text/javascript'>
175 $(document).ready(function() {
176 var columns_settings = [% ColumnsSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) %];
177 var lostitems_table = KohaTable("lostitems-table", {
178 "dom": 'B<"clearfix">t',
181 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
182 { "sType": "title-string", "aTargets" : [ "title-string" ] }
186 }, columns_settings, 'with_filters');
188 function itemSelectionBuildExportLink() {
189 var itemnumbers = new Array();
190 $("input[name='itemnumber'][type='checkbox']:checked").each(function() {
191 itemnumbers.push($(this).val());
193 if (itemnumbers.length > 0) {
194 var csv_profile_id = $("#csv_profile_id option:selected").val();
195 var url = '/cgi-bin/koha/reports/itemslost.pl?op=export&csv_profile_id='+csv_profile_id;
196 url += '&itemnumber=' + itemnumbers.join('&itemnumber=');
197 $('a.itemselection_action_export').attr('href', url);
204 function itemSelectionBuildActionLinks() {
205 var export_link_ok = itemSelectionBuildExportLink();
206 if (export_link_ok) {
207 $('.itemselection_actions').show();
209 $('.itemselection_actions').hide();
213 itemSelectionBuildActionLinks();
215 $("input[name='itemnumber'][type='checkbox']").change(function() {
216 itemSelectionBuildActionLinks();
218 $("#csv_profile_id").change(function() {
219 itemSelectionBuildActionLinks();
222 $(".SelectAll").on("click",function(e){
224 $("#lostitems-table").checkCheckboxes();
225 itemSelectionBuildActionLinks();
228 $(".ClearAll").on("click",function(e){
230 $("#lostitems-table").unCheckCheckboxes();
231 itemSelectionBuildActionLinks();
237 [% INCLUDE 'intranet-bottom.inc' %]