Bug 19663: Move JS to the footer: Reports
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reports / itemslost.tt
1 [% USE AuthorisedValues %]
2 [% USE Branches %]
3 [% USE ColumnsSettings %]
4 [% USE KohaDates %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha &rsaquo; Reports &rsaquo; Lost items</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
10 </head>
11
12 <body id="rep_itemslost" class="rep">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'cat-search.inc' %]
15
16 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>[% IF ( get_items ) %] &rsaquo; <a href="/cgi-bin/koha/reports/itemslost.pl">Lost items</a> &rsaquo; Results[% ELSE %] &rsaquo; Lost items[% END %]</div>
17
18 <div id="doc3" class="yui-t2">
19    
20    <div id="bd">
21         <div id="yui-main">
22         <div class="yui-b">
23
24 <h1>Lost items</h1>
25
26 [% IF ( get_items ) %]
27
28 <div class="results">
29     [% IF items.count%]
30         [% items.count %] lost items found
31     [% ELSE %]
32         No lost items found
33     [% END %]
34 </div>
35
36     [% IF items.count %]
37         <table id="lostitems-table">
38             <thead>
39                 <tr>
40                     <th>Title</th>
41                     <th>Author</th>
42                     <th>Lost code</th>
43                     <th>Barcode</th>
44                     <th>Call number</th>
45                     <th>Date last seen</th>
46                     <th>Price</th>
47                     <th>Rep.price</th>
48                     <th>Library</th>
49                     <th>Item type</th>
50                     <th>Current location</th>
51                     <th>Location</th>
52                     <th>Notes</th>
53                 </tr>
54             </thead>
55             <tbody>
56                 [% FOREACH item IN items %]
57                     <tr>
58                         <td>
59                             <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]" title="[% item.itemnotes %]">[% item.biblio.title |html %]</a>
60                         </td>
61                         <td>[% item.biblio.author %]</td>
62                         <td>[% AuthorisedValues.GetByCode( 'LOST', item.itemlost ) %]</td>
63                         <td>
64                             <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% item.biblionumber %]" title="[% item.itemnotes %]">[% item.barcode %]</a>
65                         </td>
66                         <td>[% item.itemcallnumber %]</td>
67                         <td>[% item.datelastseen | $KohaDates %]</td>
68                         <td>[% item.price %]</td>
69                         <td>[% item.replacementprice %]</td>
70                         <td>[% Branches.GetName(item.homebranch) %]</td>
71                         <td>[% item.effective_itemtype %]</td>
72                         <td>[% Branches.GetName(item.holdingbranch) %]</td>
73                         <td>[% item.location %]</td>
74                         <td>[% item.itemnotes %]</td>
75                     </tr>
76                 [% END %]
77             </tbody>
78         </table>
79     [% END %]
80         [% ELSE %]
81         
82         <form name="f" action="/cgi-bin/koha/reports/itemslost.pl" method="post">
83     <fieldset class="rows">
84         <ol>
85
86         <li><label for="barcodefilter">Barcode: </label><input type="text" name="barcodefilter" id="barcodefilter" size="6" /></li>
87         <li><label for="branchfilter">Library: </label><select name="branchfilter" id="branchfilter">
88                 <option value="">All</option>
89                 [% PROCESS options_for_libraries libraries => Branches.all() %]
90             </select></li>
91     <li><label for="itemtypesfilter">Item type: </label><select name="itemtypesfilter" id="itemtypesfilter">
92                 <option value="">All</option>
93                 [% FOREACH itemtype IN itemtypes %]
94                     <option value="[% itemtype.itemtype  %]">[% itemtype.translated_description %]</option>
95                 [% END %]
96             </select></li>
97
98     <li><label for="loststatusfilter">Lost status: </label><select name="loststatusfilter" id="loststatusfilter">
99                 <option value="">All</option>
100                 [% FOREACH loststatusloo IN loststatusloop %]
101                 [% IF ( loststatusloo.selected ) %]<option value="[% loststatusloo.authorised_value %]" selected="selected">[% loststatusloo.lib %]</option>
102                 [% ELSE %]
103                 <option value="[% loststatusloo.authorised_value %]">[% loststatusloo.lib %]</option>
104                 [% END %]
105                 [% END %]
106             </select></li>
107 </ol></fieldset>
108 <fieldset class="action">    <input type="submit" value="Submit" />
109     <input type="hidden" name="get_items" value="1" /></fieldset>
110 </form>
111         
112         [% END %]
113
114 </div>
115 </div>
116 <div class="yui-b">
117 [% INCLUDE 'reports-menu.inc' %]
118 </div>
119 </div>
120
121 [% MACRO jsinclude BLOCK %]
122     [% INCLUDE 'datatables.inc' %]
123     [% INCLUDE 'columns_settings.inc' %]
124     <script type='text/javascript'>
125         $(document).ready(function() {
126             var columns_settings = [% ColumnsSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) %];
127             var lostitems_table = KohaTable("#lostitems-table", {
128                 "dom": 'B<"clearfix">t',
129                 "aaSorting": [],
130                 "aoColumnDefs": [
131                     { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
132                     { "sType": "title-string", "aTargets" : [ "title-string" ] }
133                 ],
134                 "bPaginate": false,
135             }, columns_settings);
136
137         });
138     </script>
139 [% END %]
140
141 [% INCLUDE 'intranet-bottom.inc' %]