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