Merge remote-tracking branch 'origin/new/bug_6448'
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / inventory.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Tools &rsaquo; Inventory</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% INCLUDE 'calendar.inc' %]
5 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
6 <script type="text/javascript">
7 //<![CDATA[
8 $(document).ready(function(){
9         $(".checkall").click(function(){
10                 $(".checkboxed").checkCheckboxes();
11                 return false;
12                 });
13         $(".clearall").click(function(){
14                 $(".checkboxed").unCheckCheckboxes();
15                 return false;
16             });
17 [% IF ( offset ) %]$("#markseen").before("<input type=\"submit\" value=\"&lt;&lt; " + _("Mark seen and continue") + "\" id=\"markback\" /> ");[% END %]
18 [% IF ( nextoffset ) %]$("#markseen").after(" <input type=\"submit\" id=\"marknext\" value=\"" + _("Mark seen and continue") + " &gt;&gt;\" />");[% END %]
19         $("#markback").click(function(){
20                 $(".checkboxed").find("input").filter("[name=offset]").attr("value","[% prevoffset %]");
21                 return true;
22         });
23         $("#marknext").click(function(){
24                 $(".checkboxed").find("input").filter("[name=offset]").attr("value","[% nextoffset %]");
25                 return true;
26         });
27         });
28 //]]>
29 </script>
30 </head>
31 <body id="tools_inventory" class="tools">
32 [% INCLUDE 'header.inc' %]
33 [% INCLUDE 'cat-search.inc' %]
34
35 <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>
36
37 <div id="doc3" class="yui-t2">
38    
39    <div id="bd">
40         <div id="yui-main">
41         <div class="yui-b">
42     <h1>Inventory/Stocktaking</h1>
43     [% IF ( Number ) %]<div class="dialog message">[% Number %] items modified : datelastseen set to [% date %]</div>[% END %]
44     [% IF ( errorfile ) %]<div class="dialog alert">[% errorfile %] can't be opened</div>[% END %]
45     [% FOREACH errorloo IN errorloop %]
46         <div class="dialog alert">
47             [% errorloo.barcode %]
48             [% IF ( errorloo.ERR_BARCODE ) %]: barcode not found[% END %]
49             [% IF ( errorloo.ERR_WTHDRAWN ) %]: item withdrawn[% END %]
50             [% IF ( errorloo.ERR_ONLOAN_RET ) %]: item was on loan. It was returned before marked as seen[% END %]
51             [% IF ( errorloo.ERR_ONLOAN_NOT_RET ) %]: item was on loan. couldn't be returned.[% END %]
52         </div>
53     [% END %]
54         [% UNLESS ( loop ) %]
55         <div class="yui-g">
56     <form method="post" action="/cgi-bin/koha/tools/inventory.pl" enctype="multipart/form-data">
57         <fieldset class="rows">
58             <legend>Use a barcode file</legend>
59          <ol>
60             <li><label for="uploadbarcodes">Barcode file: </label> <input type="file" id="uploadbarcodes" name="uploadbarcodes" /></li>
61             <li><label for="setdate">Set inventory date to:</label> <input type="text" id="setdate" name="setdate" value="[% today %]" class="datepicker" />
62                         <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
63             </li>
64           </ol>
65         </fieldset>
66         <fieldset class="rows">
67         <legend>Select items you want to check</legend>
68         <ol><li>
69         <label for="branch">Library</label>
70             <input type="radio" name="branch" value="homebranch"> Home library</input>
71             <input type="radio" name="branch" value="holdingbranch"> Current location</input>
72         </li><li>
73         <label for="branchloop">Library</label><select id="branchloop" name="branchcode" style="width:12em;">
74             <option value="">All locations</option>
75         [% FOREACH branchloo IN branchloop %]
76             [% IF ( branchloo.selected ) %]
77                 <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
78             [% ELSE %]
79                 <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
80             [% END %]
81         [% END %]
82         </select>
83         </li>
84         [% IF ( authorised_values ) %]
85         <li>
86             <label for="locationloop">Shelving location (items.location) is</label>
87         <select id="locationloop" name="location">
88                 <option value="">Filter location</option>
89         [% FOREACH authorised_value IN authorised_values %]
90             [% IF ( authorised_value.selected ) %]
91                 <option value="[% authorised_value.authorised_value %]" selected="selected">[% authorised_value.lib %]</option>
92             [% ELSE %]
93                 <option value="[% authorised_value.authorised_value %]">[% authorised_value.lib %]</option>
94             [% END %]
95         [% END %]
96         </select>        </li>
97         [% END %]
98         <li>
99             <label for="minlocation">Item call number between: </label>
100                 <input type="text" name="minlocation" id="minlocation" value="[% minlocation %]" /> (items.itemcallnumber)  </li>
101            <li><label for="maxlocation">...and: </label>
102                 <input type="text" name="maxlocation" id="maxlocation" value="[% maxlocation %]" />
103         </li>
104         [% IF ( statuses ) %]
105         </ol>
106         </fieldset>
107             <fieldset class="rows">
108             <legend>Item statuses:</legend>
109             <div name="statuses" style="display: block;">
110                   [% FOREACH statuse IN statuses %]
111                       [% IF ( statuse.values ) %]
112                           <fieldset style="float: left; padding: 5px; margin: 5px;text-align:right">
113                               <legend>[% statuse.fieldname %]</legend>
114                               <ul id="statuses-[% statuse.fieldname %]" style="display: inline;">
115                               [% FOREACH value IN statuse.values %]
116                                   [% IF ( value.lib ) %]<li>
117                                     <label for="[% value.id %]">
118                                       [% value.lib %]
119                                     </label>
120                                     <input type="checkbox" name="status-[% value.fieldname %]-[% value.id %]" id="[% value.id %]" />
121                                   </li>[% END %]
122                               [% END %]
123                               </ul>
124                           </fieldset>
125                       [% END %]
126                   [% END %]
127                 </div>
128             </fieldset>
129                 <fieldset class="rows">
130           <ol>
131         [% END %]
132
133         <li><label for="datelastseen">Inventory date:</label>
134             <input type="text" id="datelastseen" name="datelastseen" value="[% datelastseen %]" class="datepicker"/>
135                         <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
136         </li>
137         <li><label for="ignoreissued">Skip copies on loan: </label>
138             [% IF ( ignoreissued ) %]
139             <input type="checkbox" id="ignoreissued" name="ignoreissued" checked="checked" /></li>
140             [% ELSE %]
141             <input type="checkbox" id="ignoreissued" name="ignoreissued" /></li>
142             [% END %]
143         <li><label for="pagesize">Show: </label>
144             <input type="text" id="pagesize" name="pagesize" value="[% pagesize %]" maxlength="5" size="5" /> items</li>
145           <li><label for="offset">Beginning at offset: </label>
146             <input type="text" id="offset" name="offset" value="[% offset %]" size="5" maxlength="5" />
147         </li>
148         <li>
149            <label for="CSVexport">Export to CSV file</label>
150            <input type="checkbox" name="CSVexport" id="CSVexport" />
151         </li>
152         <li>
153             <label for="compareinv2barcd">Compare barcodes list to results</label>
154             <input type="checkbox" name="compareinv2barcd" id="compareinv2barcd" />
155         </li>
156         </ol>
157   </fieldset>
158             <input type="hidden" name="op" value="do_it" />
159             <fieldset class="action"><input type="submit" value="Submit" class="button" /></fieldset>
160     </form>
161         </div>
162         </div>
163         [% END %]
164     [% IF ( loop ) %]
165     <form method="post" action="/cgi-bin/koha/tools/inventory.pl" class="checkboxed">
166     <input type="hidden" name="markseen" value="1" />
167     <input type="hidden" name="minlocation" value="[% minlocation %]" />
168     <input type="hidden" name="maxlocation" value="[% maxlocation %]" />
169     <input type="hidden" name="location" value="[% location %]" />
170     <input type="hidden" name="branchcode" value="[% branchcode %]" />
171     <input type="hidden" name="datelastseen" value="[% datelastseen %]" />
172     <input type="hidden" name="pagesize" value="[% pagesize %]" />
173     <input type="hidden" name="offset" value="[% offset %]" />
174     <div style="padding : .3em 0"><a href="#" class="checkall">[Select all]</a> <a href="#" class="clearall">[Clear all]</a></div>
175     <table>
176         <tr>
177             <th>Seen</th>
178             <th>Barcode</th>
179             <th>Title</th>
180             <th>Unseen since</th>
181             <th>Problems</th>
182         </tr>
183     [% FOREACH loo IN loop %]
184         <tr>
185             <td>
186                 <input type="checkbox" name="SEEN-[% loo.itemnumber %]" value="1" />
187             </td>
188             <td>
189                 [% loo.barcode %]
190             </td>
191             <td>
192                 <p><b>[% loo.itemcallnumber %]</b> - <a href="#" onclick="window.open('/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% loo.biblionumber %]','marcview','width=800,height=600,toolbar=0,scrollbars=1');">[% loo.title |html %]</a></p>
193                 <p>[% loo.author %]</p>
194             </td>
195             <td>
196                 <p>[% loo.datelastseen %]</p>
197             </td>
198             <td>
199                  [% IF ( loo.notfoundbarcode ) %]
200                      <p style="background: red;">Not found among barcodes in barcodes file.</p>
201                  [% ELSIF ( loo.notfoundkoha ) %]
202                      <p style="background: red;">Not found in Koha.</p>
203                  [% ELSE %]
204                      <p style="background: green;">None</p>
205                  [% END %]
206             </td>
207         </tr>
208     [% END %]
209     </table>
210     <div style="padding : .3em 0"><a href="#" class="checkall">[Select all]</a> <a href="#" class="clearall">[Clear all]</a></div>
211      <input type="submit" id="markseen" value="Mark seen" />
212     </form>
213     [% IF ( offset ) %]
214     <form method="post" action="/cgi-bin/koha/tools/inventory.pl">
215         <input type="hidden" name="branch" value="[% branch %]" />
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         <input type="hidden" name="pagesize" value="[% pagesize %]" />
222         <input type="hidden" name="offset" value="[% prevoffset %]" />
223         <input type="hidden" name="op" value="do_it" />
224         <input type="submit" value="&lt;&lt; Continue without marking" class="submit" />
225     </form>
226     [% END %]
227     [% IF ( nextoffset ) %]
228     <form method="post">
229         <input type="hidden" name="branch" value="[% branch %]" />
230         <input type="hidden" name="location" value="[% location %]" />
231         <input type="hidden" name="branchcode" value="[% branchcode %]" />
232         <input type="hidden" name="minlocation" value="[% minlocation %]" />
233         <input type="hidden" name="maxlocation" value="[% maxlocation %]" />
234         <input type="hidden" name="datelastseen" value="[% datelastseen %]" />
235         <input type="hidden" name="pagesize" value="[% pagesize %]" />
236         <input type="hidden" name="offset" value="[% nextoffset %]" />
237         <input type="hidden" name="op" value="do_it" />
238         <input type="submit" value="Continue without marking &gt;&gt;" class="submit" />
239     </form>
240     </div>
241     [% END %]
242     [% END %]
243 </div>
244 <div class="yui-b">
245 [% INCLUDE 'tools-menu.inc' %]
246 </div>
247 </div>
248 [% INCLUDE 'intranet-bottom.inc' %]