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