0e07f20cff0a5d879aafee9c66567f85f4ffaf46
[koha-equinox.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / addorderiso2709.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% USE Branches %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha &rsaquo; Acquisitions &rsaquo; Order staged MARC records
7 [% IF ( batch_details ) %]
8  &rsaquo; Batch [% import_batch_id | html %]
9 [% ELSE %]
10  &rsaquo; Batch list
11 [% END %]
12 </title>
13 <style>#dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style>
14 [% INCLUDE 'doc-head-close.inc' %]
15 [%# As long as cataloging plugins rely on <script> tags added inline, JS must be in the header %]
16 [% Asset.js("js/acquisitions-menu.js") | $raw %]
17 [% INCLUDE 'datatables.inc' %]
18 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
19 [% Asset.js("js/acq.js") | $raw %]
20 [% Asset.js("js/funds_sorts.js") | $raw %]
21 [% Asset.js("js/addorderiso2709.js") | $raw %]
22 <script>
23     var ERR_NO_RECORD_SELECTED = _("There is no record selected");
24     var ERR_INVALID_QUANTITY = _("quantity values are not filled in or are not numbers");
25     var ERR_FUNDS_MISSING = _("Some budgets are not defined in item records");
26     var MSG_LOADING = _("Loading");
27 </script>
28 </head>
29
30 <body id="acq_addorderiso2709" class="acq">
31 [% INCLUDE 'header.inc' %]
32 [% INCLUDE 'acquisitions-search.inc' %]
33 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% booksellername | html %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Basket [% basketno | html %]</a> &rsaquo; Add orders from MARC file</div>
34     <div class="container-fluid">
35         <div class="row">
36             <div class="col-sm-6 col-sm-offset-3 col-md-8 col-md-offset-2">
37              [% IF ( allmatch ) %]<div class="dialog alert">
38               <h4>No records imported</h4>
39              No record have been imported because they all match an existing record in your catalog.<br />You'll have to treat them individually.
40              </div>
41              [% END %]
42
43              [% IF ( batch_details ) %]
44                 <h1>Add orders from [% comments | html %]
45                     ([% file_name | html %] staged on [% upload_timestamp | $KohaDates  with_hours => 1 %])
46                 </h1>
47                 <form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform">
48                 <div id="tabs" class="toptabs">
49                   <ul>
50                     <li><a href="#records_to_import">Select to import</a></li>
51                     <li><a href="#items_info" class="items_info">Item information</a></li>
52                     <li><a href="#accounting_details">Default accounting details</a></li>
53                   </ul>
54
55                   <div id="records_to_import">
56                     <div id="searchheader">
57                         <div>
58                             <span class="checkall"><a id="checkAll" href="#">Select all</a></span>
59                             |
60                             <span class="uncheckall"><a id="unCheckAll" href="#">Clear all</a></span>
61                             |
62                             <span>
63                                 <label for="matcher_id">Matching:</label>
64                                     <select name="matcher_id" id="matcher_id">
65                                         <option value="_TITLE_AUTHOR_">Title and author</option>
66                                         <option value="">Do not look for matching records</option>
67                                         [% FOREACH available_matcher IN available_matchers %]
68                                             [% IF ( available_matcher.code == current_matcher_code ) %]
69                                                 <option value="[% available_matcher.matcher_id | html %]" selected="selected">
70                                                     [% available_matcher.code | html %] ([% available_matcher.description | html %])
71                                                 </option>
72                                             [% ELSE %]
73                                                 <option value="[% available_matcher.matcher_id | html %]">
74                                                     [% available_matcher.code | html %] ([% available_matcher.description | html %])
75                                                 </option>
76                                             [% END %]
77                                         [% END %]
78                                     </select>
79                             </span>
80                             |
81                             <span>
82                                 <label for="showallbudgets" style="float:none;width:auto;">&nbsp;Show inactive funds:</label>
83                                 <input type="checkbox" id="showallbudgets" />
84                             </span>
85                         </div>
86                     </div>
87
88                         <input type="hidden" name="op" value="import_records"/>
89                         <input type="hidden" name="basketno" value="[% basketno | html %]" />
90                         <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
91                         <input type="hidden" name="import_batch_id" value="[% import_batch_id | html %]" />
92                         <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" />
93
94                         [% FOREACH biblio IN biblio_list %]
95                         <fieldset class="biblio unselected rows" style="float:none;">
96                           <legend>
97                             <label for="record_[% biblio.import_record_id | html %]" style="width:auto;">
98                               <input type="checkbox" name="import_record_id" id="record_[% biblio.import_record_id | html %]" value="[% biblio.import_record_id | html %]" />
99                               <span class="citation">[% biblio.citation | html %]</span>
100                             </label>
101                             <span class="links" style="font-weight: normal;">
102                               ( <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% biblio.import_record_id | uri %]" class="previewData">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% biblio.import_record_id | html %]" class="previewData">Card</a> | <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid | html %]&amp;basketno=[% basketno | html %]&amp;breedingid=[% biblio.import_record_id | html %]&amp;import_batch_id=[% biblio.import_batch_id | html %]&amp;biblionumber=[% biblio.match_biblionumber | html %]">Add order</a> )
103                             </span>
104                           </legend>
105                           <div style="float:left">
106                           <ol>
107                             <li class="status">
108                               <span class="match">
109                                 [% IF ( biblio_lis.overlay_status == 'no_match' ) %]
110                                     No match
111                                 [% ELSIF ( biblio_lis.overlay_status == 'match_applied' ) %]
112                                     Match applied
113                                 [% ELSIF ( biblio_lis.overlay_status == 'auto_match' ) %]
114                                     Match found
115                                 [% ELSE %]
116                                     [% biblio_lis.overlay_status | html %]
117                                 [% END %]
118                                 [% IF ( biblio.match_biblionumber ) %]
119                                   Matches biblio [% biblio.match_biblionumber | uri %] (score = [% biblio.match_score | html %]): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.match_biblionumber | uri %]">[% biblio.match_citation | html %]</a>
120                                 [% END %]
121                               </span>
122                             </li>
123                             <li class="quantity">
124                                 <label for="quantity_record_[% biblio.import_record_id | html %]" class="required">Quantity: </label>
125                                 <input id="quantity_record_[% biblio.import_record_id | html %]" type="text" pattern="[0-9]+" value="[% biblio.quantity.length ? biblio.quantity : 1 | html %]" name="quantity" />
126                                 <span class="required">Required</span>
127                             </li>
128                             <li class="price">
129                                 <label for="price_record_[% biblio.import_record_id | html %]">Price: </label>
130                                 <input id="price_record_[% biblio.import_record_id | html %]" type="text" value="[% biblio.price | html %]" name="price" />
131                             </li>
132                             <li class="replacementprice">
133                                 <label for="replacementprice_record_[% biblio.import_record_id | html %]">Replacement price: </label>
134                                 <input id="replacementprice_record_[% biblio.import_record_id | html %]" type="text" value="[% biblio.replacementprice | html %]" name="replacementprice" />
135                             </li>
136                             <li class="discount">
137                                 <label for="discount_record_[% biblio.import_record_id | html %]">Discount: </label>
138                                 <input id="discount_record_[% biblio.import_record_id | html %]" type="text" value="[% biblio.discount | html %]" name="discount" size="6" /> %
139                                 <div class="hint">If empty, discount rate from vendor will be used</div>
140                             </li>
141                             <li class="fund">
142                                 [% IF ( close ) %]
143                                     <label for="fund_record_[% biblio.import_record_id | html %]">Fund: </label>
144                                     <input type="hidden" size="20" name="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %]
145                                 [% ELSE %]
146                                     <label for="fund_record_[% biblio.import_record_id | html %]">Fund: </label>
147                                     <select id="fund_record_[% biblio.import_record_id | html %]" size="1" name="budget_id">
148                                     <option value="">Select a fund (will use default if set)</option>
149                                     [% FOREACH budget IN budget_loop %]
150                                         [% IF ( budget.b_id == biblio.budget_id ) %]
151                                           [% IF budget.b_active %]
152                                             <option value="[% budget.b_id | html %]" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat | html %]" selected="selected">[% budget.b_txt | html %]</option>
153                                           [% ELSE %]
154                                             <option value="[% budget.b_id | html %]" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat | html %]" selected="selected">[% budget.b_txt | html %] (inactive)</option>
155                                           [% END %]
156                                         [% ELSE %]
157                                             [% IF budget.b_active %]<option value="[% budget.b_id | html %]" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat | html %]">[% budget.b_txt | html %]</option>
158                                             [% ELSE %]<option value="[% budget.b_id | html %]" class="b_inactive" data-sort1-authcat="[% budget.b_sort1_authcat | html %]" data-sort2-authcat="[% budget.b_sort2_authcat | html %]">[% budget.b_txt | html %] (inactive)</option>
159                                             [% END %]
160                                         [% END %]
161                                     [% END %]
162                                   </select>
163                                   <span class="required" style="display:none">Required</span>
164                                 [% END %]
165                             </li>
166                             <li class="sort1">
167                                 <label for="sort1_record_[% biblio.import_record_id | html %]">Statistic 1: </label>
168                                 <input id="sort1_record_[% biblio.import_record_id | html %]" type="text" id="sort1" size="20" name="sort1" value="[% biblio.sort1 | html %]" />
169                             </li>
170                             <li class="sort2">
171                                 <label for="sort2_record_[% biblio.import_record_id | html %]">Statistic 2: </label>
172                                 <input id="sort2_record_[% biblio.import_record_id | html %]" type="text" id="sort2" size="20" name="sort2" value="[% biblio.sort2 | html %]" />
173                             </li>
174                           </ol>
175                         </div>
176                         <div style="float:right">
177                         [% IF biblio.item_error %]Item records could not be processed because the number of item fields was uneven.[% END %]
178                         [% FOREACH item IN biblio.iteminfos %]
179                         <fieldset>
180                         <legend>Item Record [% item.item_id | html %]</legend>
181                         <ol>
182                         <li>
183                         <label for="homebranch_item_[% item.item_id | html %]">homebranch</label><select id="homebranch_item_[% item.item_id | html %]" name="homebranch_[% item.biblio_count | html %]">
184                         [% FOREACH l IN libraries %]
185                           [% IF l.branchcode == item.homebranch %]
186                             <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
187                           [% ELSE %]
188                             <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
189                           [% END %]
190                         [% END %]
191                         </select>
192                         </li>
193
194                         <li><label for="holdingbranch_item_[% item.item_id | html %]">holdingbranch</label><select id="holdingbranch_item_[% item.item_id | html %]" name="holdingbranch_[% item.biblio_count | html %]">
195                         [% FOREACH l IN libraries %]
196                           [% IF l.branchcode == item.holdingbranch %]
197                             <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
198                           [% ELSE %]
199                             <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
200                           [% END %]
201                         [% END %]
202                         </select>
203                         </li>
204                         <li><label for="itype_item_[% item.item_id | html %]">itype</label><select id="itype_item_[% item.item_id | html %]" name="itype_[% item.biblio_count | html %]">
205                         [% FOREACH itypeloo IN itypeloop %]
206                           [% IF ( itypeloo.itemtype ) == ( item.itype ) %]
207                             <option value="[% itypeloo.itemtype | html %]" selected="selected">[% itypeloo.description | html %]</option>
208                           [% ELSE %]
209                             <option value="[% itypeloo.itemtype | html %]">[% itypeloo.description | html %]</option>
210                           [% END %]
211                         [% END %]
212                         </select>
213                         </li>
214
215                         <li><label for="nonpublic_note_item_[% item.item_id | html %]">nonpublic_note</label><input type="text" id="nonpublic_note_item_[% item.item_id | html %]" name="nonpublic_note_[% item.biblio_count | html %]" value="[% item.nonpublic_note | html %]"></li>
216                         <li><label for="public_note_item_[% item.item_id | html %]">public_note</label><input type="text" id="public_note_item_[% item.item_id | html %]" name="public_note_[% item.biblio_count | html %]" value="[% item.public_note | html %]"></li>
217                         <li><label for="loc_item_[% item.item_id | html %]">loc</label><select id="loc_item_[% item.item_id | html %]" name="loc_[% item.biblio_count | html %]">
218                         <option value=""> </option>
219                         [% FOREACH locationloo IN locationloop %]
220                             [% IF ( locationloo.code ) == (item.loc) %]<option value="[% locationloo.code | html %]" selected="selected">[% locationloo.description | html %]</option>[% ELSE %]<option value="[% locationloo.code | html %]">[% locationloo.description | html %]</option>[% END %]
221                         [% END %]
222                        </select>
223                         </li>
224
225                         <li><label for="ccode_item_[% item.item_id | html %]">ccode</label><select id="ccode_item_[% item.item_id | html %]" name="ccode_[% item.biblio_count | html %]">
226                         [% FOREACH ccodeloo IN ccodeloop %]
227                             [% IF ( ccodeloo.code ) == (item.ccode) %]<option value="[% ccodeloo.code | html %]" selected="selected">[% ccodeloo.description | html %]</option>[% ELSE %]<option value="[% ccodeloo.code | html %]">[% ccodeloo.description | html %]</option>[% END %]
228                         [% END %]
229                         </select>
230                         </li>
231
232                         <li><label for="notforloan_item_[% item.item_id | html %]">notforloan</label><select id="notforloan_item_[% item.item_id | html %]" name="notforloan_[% item.biblio_count | html %]">
233                         [% FOREACH n IN notforloanloop %]
234                             [% IF n.code == item.notforloan %]
235                                 <option value="[% n.code | html %]" selected="selected">[% n.description | html %]</option>
236                             [% ELSE %]
237                                 <option value="[% n.code | html %]">[% n.description | html %]</option>
238                             [% END %]
239                         [% END %]
240                         </select>
241                         </li>
242                         <li><label for="uri_item_[% item.item_id | html %]">uri</label><input type="text" id="uri_item_[% item.item_id | html %]" name="uri_[% item.biblio_count | html %]" value="[% item.uri | html %]"></li>
243                         <li><label for="copyno_item_[% item.item_id | html %]">copyno</label><input type="text" id="copyno_item_[% item.item_id | html %]" name="copyno_[% item.biblio_count | html %]" value="[% item.copyno | html %]"></li>
244                         <li><label for="budget_code_item_[% item.item_id | html %]">budget_code</label><select class="budget_code_item" id="budget_code_item_[% item.item_id | html %]" name="budget_code_[% item.biblio_count | html %]">
245                         <option value="">Select a fund (will use default if set)</option>
246                         [% FOREACH budget_loo IN budget_loop %]
247                             [% IF ( budget_loo.b_id ) == ( item.budget_id ) %]<option value="[% budget_loo.b_id | html %]" selected="selected">[% budget_loo.b_txt | html %]</option>
248                             [% ELSE %]<option value="[% budget_loo.b_id | html %]">[% budget_loo.b_txt | html %]</option>
249                             [% END %]
250                         [% END %]
251                         </select>
252                         <span class="item_fund required">Required</span>
253                         </li>
254                         <li><label for="price_item_[% item.item_id | html %]">price</label><input type="text" id="price_item_[% item.item_id | html %]" name="itemprice_[% item.biblio_count | html %]" value="[% item.itemprice | html %]"></li>
255                         <li><label for="replacementprice_item_[% item.item_id | html %]">replacement price</label><input type="text" id="replacementprice_item_[% item.item_id | html %]" name="replacementprice_[% item.biblio_count | html %]" value="[% item.replacementprice | html %]"></li>
256                         <li><label for="callnumber_item_[% item.item_id | html %]">callnumber</label><input type="text" id="callnumber_item_[% item.item_id | html %]" name="itemcallnumber_[% item.biblio_count | html %]" value="[% item.itemcallnumber | html %]"></li>
257                         </ol>
258                         </fieldset>
259                         [% END %]
260                         </div>
261                         </fieldset>
262                             <div id="dataPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
263                                 <div class="modal-dialog">
264                                 <div class="modal-content">
265                                 <div class="modal-header">
266                                     <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
267                                     <h3 id="dataPreviewLabel">MARC preview</h3>
268                                 </div>
269                                 <div class="modal-body">
270                                     <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
271                                 </div>
272                                 <div class="modal-footer">
273                                     <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
274                                 </div>
275                                 </div>
276                                 </div>
277                             </div>
278                         [% END %]
279                       </div>
280                       <div id="items_info">
281                         <h2>Item information</h2>
282                         <p>Import all the checked items in the basket with the following parameters:</p>
283
284                         [% IF ( items ) %]
285                         <fieldset class="rows" style="float:none;">
286                             <legend>Item</legend>
287                             [% IF ( NoACQframework ) %]
288                                 <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
289                             [% END %]
290                             [% FOREACH item IN items %]
291                             <div id="outeritemblock">
292                             <div id="itemblock">
293                                 <ol>
294                                 [% FOREACH iteminformatio IN item.iteminformation %]<li style="[% iteminformatio.hidden | html %];">
295                                     <div class="subfield_line" id="subfield[% iteminformatio.serialid | html %][% iteminformatio.countitems | html %][% iteminformatio.subfield | html %][% iteminformatio.random | html %]">
296                                         [% IF (iteminformatio.mandatory) %]
297                                             <label class="required">[% iteminformatio.subfield | html %] - [% iteminformatio.marc_lib | $raw %]</label>
298                                         [% ELSE %]
299                                             <label>[% iteminformatio.subfield | html %] - [% iteminformatio.marc_lib | $raw %]</label>
300                                         [% END %]
301
302                                         [% IF ( iteminformatio.marc_value.type == 'select' ) %]
303                                             <select name="field_value" size="1">
304                                             [% FOREACH value IN iteminformatio.marc_value.values %]
305                                                 [% IF ( value == iteminformatio.marc_value.default ) %]
306                                                     <option value="[% value | html %]" selected="selected">[% iteminformatio.marc_value.labels.$value | html %]</option>
307                                                 [% ELSE %]
308                                                     <option value="[% value | html %]">[% iteminformatio.marc_value.labels.$value | html %]</option>
309                                                 [% END %]
310                                             [% END %]
311                                             </select>
312                                         [% ELSE %]
313                                         [% iteminformatio.marc_value | $raw %]
314                                         [% END %]
315                                         <input type="hidden" name="itemid" value="1" />
316                                         <input type="hidden" name="kohafield" value="[% iteminformatio.kohafield | html %]" />
317                                         <input type="hidden" name="tag" value="[% iteminformatio.tag | html %]" />
318                                         <input type="hidden" name="subfield" value="[% iteminformatio.subfield | html %]" />
319                                         <input type="hidden" name="mandatory" value="[% iteminformatio.mandatory | html %]" />
320                                         [% IF ( iteminformatio.mandatory ) %] <span class="required">Required</span>[% END %]
321                                     </div></li>
322                                 [% END %]
323                                 </ol>
324                             </div><!-- /iteminformation -->
325                             </div>
326                             [% END %] <!-- /items -->
327                         </fieldset>
328                         [% END %] <!-- items -->
329                       </div>
330                       <div id="accounting_details">
331                         <p>Import all the checked items in the basket with the following accounting details (used only if no information is filled for the item):</p>
332                         <fieldset class="rows" style="float:none;">
333                             <legend>Accounting details</legend>
334                             <ol>
335                                 <li>
336                                     <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, useful when receiveing an order -->
337                                     <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
338                                 </li>
339                                 <li>
340                                     [% IF ( close ) %]
341                                         <span class="label">Fund: </span>
342                                         <input type="hidden" size="20" name="budget_id" id="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %]
343                                     [% ELSE %]
344                                         <li>
345                                             <label for="all_currency">Currency:</label>
346                                             <select name="all_currency" id="all_currency">
347                                             [% FOREACH currency IN currencies %]
348                                                 [% IF currency.currency == bookseller.listprice %]
349                                                     <option value="[% currency.currency | html %]" selected="selected">[% currency.currency | html %]</option>
350                                                 [% ELSIF not currency.archived %]
351                                                     <option value="[% currency.currency | html %]">[% currency.currency | html %]</option>
352                                                 [% END %]
353                                             [% END %]
354                                             </select>
355                                         </li>
356                                         <li>
357                                             <label for="all_budget_id">Fund: </label>
358                                             <select id="all_budget_id" size="1" name="all_budget_id">
359                                               <option value="">Select a fund (will populate orders/items if set)</option>
360                                             [% FOREACH budget_loo IN budget_loop %]
361                                                 [% IF ( budget_loo.b_active ) %]<option value="[% budget_loo.b_id | html %]" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]">[% budget_loo.b_txt | html %]</option>
362                                                 [% ELSE %]<option value="[% budget_loo.b_id | html %]" class="b_inactive" data-sort1-authcat="[% budget_loo.b_sort1_authcat | html %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat | html %]">[% budget_loo.b_txt | html %] (inactive)</option>
363                                                 [% END %]
364                                             [% END %]
365                                             </select>
366                                             <label for="all_showallbudgets" style="float:none;width:auto;">&nbsp;Show inactive:</label>
367                                             <input type="checkbox" id="all_showallbudgets" />
368                                         </li>
369                                     [% END %]
370                                 </li>
371                                 <li>
372                                     <label for="all_order_internalnote">Internal note: </label>
373                                     <textarea id="all_order_internalnote" cols="30" rows="3" name="all_order_internalnote"></textarea>
374                                 </li>
375                                 <li>
376                                     <label for="all_order_vendornote">Vendor note: </label>
377                                     <textarea id="all_order_vendornote" cols="30" rows="3" name="all_order_vendornote"></textarea>
378                                 </li>
379                                 <li>
380                                     <div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
381                                     <label for="all_sort1">Statistic 1: </label>
382                                     <input type="text" id="all_sort1" size="20" name="all_sort1" value="" />
383                                 </li>
384                                 <li>
385                                     <label for="all_sort2">Statistic 2: </label>
386                                     <input type="text" id="all_sort2" size="20" name="all_sort2" value="" />
387                                 </li>
388                             </ol>
389                         </fieldset>
390                       </div>
391                       </div>
392
393                       <fieldset class="action">
394                           <input id="add_order" type="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Cancel</a>
395                       </fieldset>
396                     </form>
397                 [% ELSE %]
398                 <div>
399                   <h1>Choose the file to add to the basket</h1>
400                   <table id="files">
401                     <thead>
402                       <tr>
403                         <th>File name</th>
404                         <th>Comments</th>
405                         <th>Status</th>
406                         <th class="title-string">Staged</th>
407                         <th># Bibliographic records</th>
408                         <th class="NoSort">&nbsp;</th>
409                       </tr>
410                     </thead>
411                     <tbody>
412                       [% FOREACH batch_lis IN batch_list %]
413                       <tr>
414                         <td>[% batch_lis.file_name | html %]</td>
415                         <td>[% batch_lis.comments | html %]</td>
416                         <td>
417                           [% IF ( batch_lis.import_status == 'cleaned' ) %]
418                             Cleaned
419                           [% ELSIF ( batch_lis.import_status == 'imported' ) %]
420                             Imported
421                           [% ELSIF ( batch_lis.import_status == 'importing' ) %]
422                             Importing
423                           [% ELSIF ( batch_lis.import_status == 'reverted' ) %]
424                             Reverted
425                           [% ELSIF ( batch_lis.import_status == 'reverting' ) %]
426                             Reverting
427                           [% ELSIF ( batch_lis.import_status == 'staged' ) %]
428                             Staged
429                           [% ELSE %]
430                             [% batch_lis.import_status | html %]
431                           [% END %]
432                         </td>
433                         <td><span title="[% batch_lis.staged_date | html %]">[% batch_lis.staged_date | $KohaDates  with_hours => 1 %]</span></td>
434                         <td>[% batch_lis.num_records | html %]</td>
435                         <td class="actions">
436                             <a href="[% batch_lis.scriptname | url %]?import_batch_id=[% batch_lis.import_batch_id | uri %]&amp;basketno=[% basketno | uri %]&amp;booksellerid=[% booksellerid | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Add orders</a>
437                         </td>
438                       </tr>
439                       [% END %]
440                     </tbody>
441                   </table>
442                 </div>
443                 [% END %]
444             </div> [% # /div.col-sm-6 %]
445        </div> [% # /div.row %]
446
447 [% INCLUDE 'intranet-bottom.inc' %]