Bug 11473 - Improve wording in log viewer template
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / inventory.tt
1 [% USE KohaDates %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Tools &rsaquo; Inventory</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
6 [% INCLUDE 'datatables.inc' %]
7 [% INCLUDE 'calendar.inc' %]
8 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
9 <script type="text/javascript">
10 //<![CDATA[
11 $(document).ready(function(){
12
13         inventorydt = $('#inventoryt').dataTable($.extend(true, {}, dataTablesDefaults, {
14             'sPaginationType': 'full_numbers',
15             [% IF compareinv2barcd %]
16                 "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 1 ] } ]
17             [% ELSE %]
18                 "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0 ] } ]
19             [% END %]
20         } ));
21
22
23         $("#continuewithoutmarkingbutton").click(function(){
24             inventorydt.fnPageChange( 'next' );
25             return false;
26         });
27
28         $("#markseenandcontinuebutton").click(function(){
29             var param = '';
30             $("input:checked").each(function() {
31                 param += "|" + $(this).attr('name');
32             });
33             $.post('/cgi-bin/koha/tools/ajax-inventory.pl', { seen: param });
34             inventorydt.fnPageChange( 'next' );
35             return false;
36         });
37
38         $("#markseenandquit").click(function(){
39             var param = '';
40             $("input:checked").each(function() {
41                 param += "|" + $(this).attr('name');
42             });
43             $.ajax({
44               type: 'POST',
45               url: '/cgi-bin/koha/tools/ajax-inventory.pl',
46               data: { seen: param},
47               async: false
48             });
49             document.location.href = '/cgi-bin/koha/tools/inventory.pl';
50             return false;
51         });
52
53
54     $(".checkall").click(function(){
55             $(".checkboxed").checkCheckboxes();
56             return false;
57         });
58     $(".clearall").click(function(){
59             $(".checkboxed").unCheckCheckboxes();
60             return false;
61         });
62     });
63 //]]>
64 </script>
65 </head>
66 <body id="tools_inventory" class="tools">
67 [% INCLUDE 'header.inc' %]
68 [% INCLUDE 'cat-search.inc' %]
69
70 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; [% IF (loop) %]<a href="/cgi-bin/koha/tools/inventory.pl">Inventory</a> &rsaquo; Results[% ELSE %]Inventory[% END %]</div>
71
72 <div id="doc3" class="yui-t2">
73
74    <div id="bd">
75     <div id="yui-main">
76     <div class="yui-b">
77     <h1>Inventory/Stocktaking</h1>
78     [% IF (moddatecount) %]<div class="dialog message">[% moddatecount %] items modified : datelastseen set to [% date | $KohaDates %]</div>[% END %]
79     [% IF (errorfile) %]<div class="dialog alert">[% errorfile %] can't be opened</div>[% END %]
80     [% FOREACH error IN errorloop %]
81         <div class="dialog alert">
82             [% error.barcode %]
83             [% IF (error.ERR_BARCODE) %]: barcode not found[% END %]
84             [% IF (error.ERR_WTHDRAWN) %]: item withdrawn[% END %]
85             [% IF (error.ERR_ONLOAN_RET) %]: item was on loan. It was returned before marked as seen[% END %]
86             [% IF (error.ERR_ONLOAN_NOT_RET) %]: item was on loan. couldn't be returned.[% END %]
87         </div>
88     [% END %]
89        [% UNLESS op %]
90     <div class="yui-g">
91     <form method="post" action="/cgi-bin/koha/tools/inventory.pl" enctype="multipart/form-data">
92         <fieldset class="rows">
93             <legend>Use a barcode file</legend>
94      <ol>
95             <li><label for="uploadbarcodes">Barcode file: </label> <input type="file" id="uploadbarcodes" name="uploadbarcodes" /></li>
96             <li><label for="setdate">Set inventory date to:</label> <input type="text" id="setdate" name="setdate" value="[% today | $KohaDates %]" class="datepickerfrom" />
97             </li>
98           </ol>
99         </fieldset>
100         <fieldset class="rows">
101         <legend>Select items you want to check</legend>
102         <ol><li>
103         <label for="branch">Library: </label>
104             <input type="radio" name="branch" value="homebranch"> Home library</input>
105             <input type="radio" name="branch" value="holdingbranch"> Current library</input>
106         </li><li>
107         <label for="branchloop">Library: </label><select id="branchloop" name="branchcode" style="width:12em;">
108             <option value="">All libraries</option>
109         [% FOREACH branchloo IN branchloop %]
110             [% IF ( branchloo.selected ) %]
111                 <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
112             [% ELSE %]
113                 <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
114             [% END %]
115         [% END %]
116         </select>
117         </li>
118         [% IF (authorised_values) %]
119         <li>
120             <label for="locationloop">Shelving location (items.location) is: </label>
121         <select id="locationloop" name="location">
122                 <option value="">Filter location</option>
123         [% FOREACH value IN authorised_values %]
124             [% IF (value.selected) %]
125                 <option value="[% value.authorised_value %]" selected="selected">[% value.lib %]</option>
126             [% ELSE %]
127                 <option value="[% value.authorised_value %]">[% value.lib %]</option>
128             [% END %]
129         [% END %]
130         </select>        </li>
131         [% END %]
132         <li>
133             <label for="minlocation">Item callnumber between: </label>
134                 <input type="text" name="minlocation" id="minlocation" value="[% minlocation %]" /> (items.itemcallnumber)  </li>
135            <li><label for="maxlocation">...and: </label>
136                 <input type="text" name="maxlocation" id="maxlocation" value="[% maxlocation %]" />
137         </li>
138         [% IF (statuses) %]
139     </ol>
140     </fieldset>
141             <fieldset class="rows">
142             <legend>Item statuses</legend>
143             <div name="statuses" style="display: block;">
144                   [% FOREACH status IN statuses %]
145                       [% IF (status.values) %]
146                           <fieldset style="float: left; padding: 5px; margin: 5px;text-align:right">
147                               <legend>[% status.fieldname %]</legend>
148                               <ul id="statuses-[% fieldname %]" style="display: inline;">
149                               [% FOREACH value IN status.values %]
150                                   [% IF (value.lib) %]<li>
151                                     <label for="[% value.id %]">
152                                       [% value.lib %]
153                                     </label>
154                                     <input type="checkbox" name="status-[% status.fieldname %]-[% value.authorised_value %]" id="[% value.authorised_value %]" />
155                                   </li>[% END %]
156                               [% END %]
157                               </ul>
158                           </fieldset>
159                       [% END %]
160                   [% END %]
161                 </div>
162             </fieldset>
163         <fieldset class="rows">
164           <ol>
165         [% END %]
166
167         <li><label for="datelastseen">Inventory date:</label>
168             <input type="text" id="datelastseen" name="datelastseen" value="[% datelastseen | $KohaDates %]" class="datepickerfrom" />
169         </li>
170         <li><label for="ignoreissued">Skip copies on loan: </label>
171             [% IF (ignoreissued) %]
172             <input type="checkbox" id="ignoreissued" name="ignoreissued" checked="checked" /></li>
173             [% ELSE %]
174             <input type="checkbox" id="ignoreissued" name="ignoreissued" /></li>
175             [% END %]
176         <li>
177            <label for="CSVexport">Export to CSV file: </label>
178            <input type="checkbox" name="CSVexport" id="CSVexport" />
179         </li>
180         <li>
181             <label for="compareinv2barcd">Compare barcodes list to results: </label>
182             <input type="checkbox" name="compareinv2barcd" id="compareinv2barcd" />
183         </li>
184         </ol>
185   </fieldset>
186             <input type="hidden" name="op" value="do_it" />
187             <fieldset class="action"><input type="submit" value="Submit" class="button" /></fieldset>
188     </form>
189     </div>
190     </div>
191     [% END %]
192     [% IF (op) %]
193     <form method="post" action="/cgi-bin/koha/tools/inventory.pl" class="checkboxed">
194     <input type="hidden" name="markseen" value="1" />
195     <input type="hidden" name="minlocation" value="[% minlocation %]" />
196     <input type="hidden" name="maxlocation" value="[% maxlocation %]" />
197     <input type="hidden" name="location" value="[% location %]" />
198     <input type="hidden" name="branchcode" value="[% branchcode %]" />
199     <input type="hidden" name="datelastseen" value="[% datelastseen %]" />
200
201     [% UNLESS compareinv2barcd %]
202       <div><a href="#" class="checkall">[Select all]</a> <a href="#" class="clearall">[Clear all]</a></div>
203     [% END %]
204
205     <table id="inventoryt">
206     <thead>
207         <tr>
208             [% UNLESS compareinv2barcd %]<th>Seen</th>[% END %]
209             <th>Barcode</th>
210             <th>Library</th>
211             <th>Title</th>
212             <th>Status</th>
213             <th>Lost</th>
214             <th>Damaged</th>
215             <th>Unseen since</th>
216             <th>Problems</th>
217         </tr>
218     </thead>
219     <tbody>
220     [% FOREACH result IN loop %]
221         <tr>
222             [% UNLESS compareinv2barcd %]
223               <td>
224                 <input type="checkbox" name="SEEN-[% result.itemnumber %]" value="1" />
225               </td>
226             [% END %]
227             <td>
228             [% result.barcode | html %]
229             </td>
230             <td>
231             [% result.homebranch | html %] [% result.location | html %] [[% result.itemcallnumber | html %]]
232             </td>
233             <td>
234             <p><a href="#" onclick="window.open('/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% result.biblionumber %]','marcview','width=800,height=600,toolbar=0,scrollbars=1');">[% result.title | html %]</a></p><p>[% result.author | html %]</p>
235             </td>
236             <td>
237             [% result.notforloan | html %]
238             </td>
239             <td>
240             [% result.itemlost | html %]
241             </td>
242             <td>
243             [% result.damaged | html %]
244             </td>
245             <td>
246             [% result.datelastseen | html | $KohaDates%]
247             </td>
248             <td>
249             [% IF result.problem == 'wrongplace' %]
250                 <p>Item should not have been scanned</p>
251             [% ELSIF result.problem == 'missingitem' %]
252                 <p>Item missing</p>
253             [% ELSIF result.problem == 'changestatus' %]
254                 <p>Change item status</p>
255             [% ELSIF result.problem == 'not_scanned' %]
256                 <p>Item should have been scanned</p>
257             [% END %]
258             </td>
259         </tr>
260     [% END %]
261     </tbody>
262     </table>
263     <div class="spacer"></div>
264     [% UNLESS compareinv2barcd %]
265       <div style="padding : .3em 0"><a href="#" class="checkall">[Select all]</a> <a href="#" class="clearall">[Clear all]</a></div>
266       <input type="submit" id="markseenandquit" value="Mark seen and quit" />
267       <input type="submit" value="Mark Seen and Continue &gt;&gt;" id="markseenandcontinuebutton" />
268       <input type="submit" value="Continue without Marking &gt;&gt;" id="continuewithoutmarkingbutton" class="submit" />
269     [% END %]
270     </form>
271
272     </div>
273
274     [% END %]
275 </div>
276 <div class="yui-b">
277 [% INCLUDE 'tools-menu.inc' %]
278 </div>
279 </div>
280 [% INCLUDE 'intranet-bottom.inc' %]