Merge remote-tracking branch 'origin/new/bug_7143'
[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 %]" />
62              <img src="[% themelang %]/lib/calendar/cal.gif" id="setdate_button" alt="Show calendar" />
63             <script type="text/javascript">
64             Calendar.setup(
65             {
66             inputField : "setdate",
67             ifFormat : "[% DHTMLcalendar_dateformat %]",
68             button : "setdate_button"
69             }
70             );
71             </script>
72                         <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
73             </li>
74           </ol>
75         </fieldset>
76         <fieldset class="rows">
77         <legend>Select items you want to check</legend>
78         <ol><li>
79         <label for="branch">Library</label>
80             <input type="radio" name="branch" value="homebranch">Home library</input>
81             <input type="radio" name="branch" value="holdingbranch">Current location</input>
82         </li><li>
83         <label for="branchloop">Library</label><select id="branchloop" name="branchcode" style="width:12em;">
84             <option value="">All locations</option>
85         [% FOREACH branchloo IN branchloop %]
86             [% IF ( branchloo.selected ) %]
87                 <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
88             [% ELSE %]
89                 <option value="[% branchloo.value %]">[% branchloo.branchname %]</option>
90             [% END %]
91         [% END %]
92         </select>
93         </li>
94         [% IF ( authorised_values ) %]
95         <li>
96             <label for="locationloop">Shelving location (items.location) is</label>
97         <select id="locationloop" name="location">
98                 <option value="">Filter location</option>
99         [% FOREACH authorised_value IN authorised_values %]
100             [% IF ( authorised_value.selected ) %]
101                 <option value="[% authorised_value.authorised_value %]" selected="selected">[% authorised_value.lib %]</option>
102             [% ELSE %]
103                 <option value="[% authorised_value.authorised_value %]">[% authorised_value.lib %]</option>
104             [% END %]
105         [% END %]
106         </select>        </li>
107         [% END %]
108         <li>
109             <label for="minlocation">Item call number between: </label>
110                 <input type="text" name="minlocation" id="minlocation" value="[% minlocation %]" /> (items.itemcallnumber)  </li>
111            <li><label for="maxlocation">...and: </label>
112                 <input type="text" name="maxlocation" id="maxlocation" value="[% maxlocation %]" />
113         </li>
114         [% IF ( statuses ) %]
115         </ol>
116         </fieldset>
117             <fieldset class="rows">
118             <legend>Item statuses:</legend>
119             <div name="statuses" style="display: block;">
120                   [% FOREACH statuse IN statuses %]
121                       [% IF ( statuse.values ) %]
122                           <fieldset style="float: left; padding: 5px; margin: 5px;text-align:right">
123                               <legend>[% statuse.fieldname %]</legend>
124                               <ul id="statuses-[% statuse.fieldname %]" style="display: inline;">
125                               [% FOREACH value IN statuse.values %]
126                                   [% IF ( value.lib ) %]<li>
127                                     <label for="[% value.id %]">
128                                       [% value.lib %]
129                                     </label>
130                                     <input type="checkbox" name="status-[% value.fieldname %]-[% value.id %]" id="[% value.id %]" />
131                                   </li>[% END %]
132                               [% END %]
133                               </ul>
134                           </fieldset>
135                       [% END %]
136                   [% END %]
137                 </div>
138             </fieldset>
139                 <fieldset class="rows">
140           <ol>
141         [% END %]
142
143         <li><label for="datelastseen">Inventory date:</label>
144             <input type="text" id="datelastseen" name="datelastseen" value="[% datelastseen %]" />
145             <img src="[% themelang %]/lib/calendar/cal.gif" id="datelastseen_button" alt="Show Calendar" />
146             <script type="text/javascript">
147             Calendar.setup(
148             {
149             inputField : "datelastseen",
150             ifFormat : "[% DHTMLcalendar_dateformat %]",
151             button : "datelastseen_button"
152             }
153             );
154             </script>
155                         <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
156         </li>
157         <li><label for="ignoreissued">Skip copies on loan: </label>
158             [% IF ( ignoreissued ) %]
159             <input type="checkbox" id="ignoreissued" name="ignoreissued" checked="checked" /></li>
160             [% ELSE %]
161             <input type="checkbox" id="ignoreissued" name="ignoreissued" /></li>
162             [% END %]
163         <li><label for="pagesize">Show: </label>
164             <input type="text" id="pagesize" name="pagesize" value="[% pagesize %]" maxlength="5" size="5" /> items</li>
165           <li><label for="offset">Beginning at offset: </label>
166             <input type="text" id="offset" name="offset" value="[% offset %]" size="5" maxlength="5" />
167         </li>
168         <li>
169            <label for="CSVexport">Export to CSV file</label>
170            <input type="checkbox" name="CSVexport" id="CSVexport" />
171         </li>
172         <li>
173             <label for="compareinv2barcd">Compare barcodes list to results</label>
174             <input type="checkbox" name="compareinv2barcd" id="compareinv2barcd" />
175         </li>
176         </ol>
177   </fieldset>
178             <input type="hidden" name="op" value="do_it" />
179             <fieldset class="action"><input type="submit" value="Submit" class="button" /></fieldset>
180     </form>
181         </div>
182         </div>
183         [% END %]
184     [% IF ( loop ) %]
185     <form method="post" action="/cgi-bin/koha/tools/inventory.pl" class="checkboxed">
186     <input type="hidden" name="markseen" value="1" />
187     <input type="hidden" name="minlocation" value="[% minlocation %]" />
188     <input type="hidden" name="maxlocation" value="[% maxlocation %]" />
189     <input type="hidden" name="location" value="[% location %]" />
190     <input type="hidden" name="branchcode" value="[% branchcode %]" />
191     <input type="hidden" name="datelastseen" value="[% datelastseen %]" />
192     <input type="hidden" name="pagesize" value="[% pagesize %]" />
193     <input type="hidden" name="offset" value="[% offset %]" />
194     <div style="padding : .3em 0"><a href="#" class="checkall">[Select all]</a> <a href="#" class="clearall">[Clear all]</a></div>
195     <table>
196         <tr>
197             <th>Seen</th>
198             <th>Barcode</th>
199             <th>Title</th>
200             <th>Unseen since</th>
201             <th>Problems</th>
202         </tr>
203     [% FOREACH loo IN loop %]
204         <tr>
205             <td>
206                 <input type="checkbox" name="SEEN-[% loo.itemnumber %]" value="1" />
207             </td>
208             <td>
209                 [% loo.barcode %]
210             </td>
211             <td>
212                 <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>
213                 <p>[% loo.author %]</p>
214             </td>
215             <td>
216                 <p>[% loo.datelastseen %]</p>
217             </td>
218             <td>
219                  [% IF ( loo.notfoundbarcode ) %]
220                      <p style="background: red;">Not found among barcodes in barcodes file.</p>
221                  [% ELSIF ( loo.notfoundkoha ) %]
222                      <p style="background: red;">Not found in Koha.</p>
223                  [% ELSE %]
224                      <p style="background: green;">None</p>
225                  [% END %]
226             </td>
227         </tr>
228     [% END %]
229     </table>
230     <div style="padding : .3em 0"><a href="#" class="checkall">[Select all]</a> <a href="#" class="clearall">[Clear all]</a></div>
231      <input type="submit" id="markseen" value="Mark seen" />
232     </form>
233     [% IF ( offset ) %]
234     <form method="post" action="/cgi-bin/koha/tools/inventory.pl">
235         <input type="hidden" name="branch" value="[% branch %]" />
236         <input type="hidden" name="minlocation" value="[% minlocation %]" />
237         <input type="hidden" name="maxlocation" value="[% maxlocation %]" />
238         <input type="hidden" name="location" value="[% location %]" />
239         <input type="hidden" name="branchcode" value="[% branchcode %]" />
240         <input type="hidden" name="datelastseen" value="[% datelastseen %]" />
241         <input type="hidden" name="pagesize" value="[% pagesize %]" />
242         <input type="hidden" name="offset" value="[% prevoffset %]" />
243         <input type="hidden" name="op" value="do_it" />
244         <input type="submit" value="&lt;&lt; Continue without marking" class="submit" />
245     </form>
246     [% END %]
247     [% IF ( nextoffset ) %]
248     <form method="post">
249         <input type="hidden" name="branch" value="[% branch %]" />
250         <input type="hidden" name="location" value="[% location %]" />
251         <input type="hidden" name="branchcode" value="[% branchcode %]" />
252         <input type="hidden" name="minlocation" value="[% minlocation %]" />
253         <input type="hidden" name="maxlocation" value="[% maxlocation %]" />
254         <input type="hidden" name="datelastseen" value="[% datelastseen %]" />
255         <input type="hidden" name="pagesize" value="[% pagesize %]" />
256         <input type="hidden" name="offset" value="[% nextoffset %]" />
257         <input type="hidden" name="op" value="do_it" />
258         <input type="submit" value="Continue without marking &gt;&gt;" class="submit" />
259     </form>
260     </div>
261     [% END %]
262     [% END %]
263 </div>
264 <div class="yui-b">
265 [% INCLUDE 'tools-menu.inc' %]
266 </div>
267 </div>
268 [% INCLUDE 'intranet-bottom.inc' %]