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