Merge remote-tracking branch 'origin/new/bug_8382'
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / addorderiso2709.tt
1 [% USE KohaDates %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Acquisitions &rsaquo; Order staged MARC records
4 [% IF ( batch_details ) %]
5  &rsaquo; Batch [% import_batch_id %]
6 [% ELSE %]
7  &rsaquo; Batch list
8 [% END %]
9 </title>
10 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
11 [% INCLUDE 'doc-head-close.inc' %]
12 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
13 [% INCLUDE 'datatables-strings.inc' %]
14 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
15 <script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
16 <script type="text/JavaScript">
17 //<![CDATA[
18     $(document).ready(function() {
19         var srlt = $("#files").dataTable($.extend(true, {}, dataTablesDefaults, {
20             "aoColumnDefs": [
21                 { "aTargets": [ 5 ], "bSortable": false, "bSearchable": false },
22             ],
23             "sPaginationType": "four_button"
24         } ) );
25     });
26 //]]>
27 </script>
28 </head>
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 %]">[% booksellername %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Basket [% basketno %]</a> &rsaquo;  Add orders from iso2709 file</div>
33 <div id="doc3" class="yui-t2">
34    <div id="bd">
35        <div id="yui-main">
36            <div class="yui-b">
37              [% IF ( batch_details ) %]
38                   <h1>Add orders from [% comments %]
39                     ([% file_name %] staged on [% upload_timestamp %])
40                   </h1>
41                <div>
42                    <form action="[% scriptname %]" method="post" name="import_biblios">
43                      <table>
44                      <tr>
45                          <th>Citation</th>
46                          <th>Match?</th>
47                          <th>Order</th>
48                        </tr>
49                        [% FOREACH biblio_lis IN biblio_list %]
50                          <tr>
51                              <td>
52                                 [% biblio_lis.citation %]
53
54                              </td>
55                              <td>[% biblio_lis.overlay_status %]</td>
56                              <td><a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]&amp;breedingid=[% biblio_lis.import_record_id %]&amp;import_batch_id=[% biblio_lis.import_batch_id %]&amp;biblionumber=[% biblio_lis.match_biblionumber %]">Add order</a></td>
57                          </tr>
58      [% IF ( biblio_lis.match_biblionumber ) %]
59     <tr>
60       <td class="highlight" colspan="3">&nbsp;&nbsp;&nbsp;Matches biblio [% biblio_lis.match_biblionumber %] (score = [% biblio_lis.match_score %]): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio_lis.match_biblionumber %]">[% biblio_lis.match_citation %]</a></td>
61     </tr>
62     [% END %]
63                       [% END %]
64                      </table>
65                    </form>
66                </div>
67               [% IF ( pages ) %]
68                 <div class="pages">
69                 Page 
70                   [% FOREACH page IN pages %]
71                     [% IF ( page.current_page ) %]
72                       <span class="current">[% page.page_number %]</span>
73                     [% ELSE %]
74                       <a class="nav" href="[% page.script_name %]?import_batch_id=[% page.import_batch_id %]&amp;offset=[% page.offset %]">[% page.page_number %]</a>
75                     [% END %]
76                   [% END %]
77               [% END %]
78              [% ELSE %]
79                <div>
80                 <h1>Choose the file to add to the basket</h1>
81                    <table id="files">
82                      <thead>
83                      <tr>
84                        <th>File name</th>
85                        <th>Comments</th>
86                        <th>Status</th>
87                        <th>Staged</th>
88                        <th># Bibs</th>
89                        <th>&nbsp;</th>
90                      </tr>
91                      </thead>
92                      <tbody>
93                      [% FOREACH batch_lis IN batch_list %]
94                      <tr>
95                         <td>[% batch_lis.file_name %]</td>
96                        <td>[% batch_lis.comments %]</td>
97                        <td>[% batch_lis.import_status %]</td>
98                        <td>[% batch_lis.staged_date | $KohaDates %] [% batch_lis.staged_hour %]</td>
99                        <td>[% batch_lis.num_biblios %]</td>
100                        <td><a href="[% batch_lis.scriptname %]?import_batch_id=[% batch_lis.import_batch_id %]&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]">Add orders</a></td>
101                      </tr>
102                      [% END %]
103                      </tbody>
104                    </table>
105                </div>
106              [% END %]
107            </div>
108         [% IF ( import_batch_id ) %]
109             <div class="yui-b">
110             <h2>Import All</h2>
111             <p>Import all the lines in the basket with the following parameters:</p>
112             <form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform">
113                     <input type="hidden" name="op" value="import_records"/>
114                     <input type="hidden" name="ordernumber" value="[% ordernumber %]" />
115                     <input type="hidden" name="basketno" value="[% basketno %]" />
116                     <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
117                     <input type="hidden" name="import_batch_id" value="[% import_batch_id %]" />
118
119                     [% FOREACH loop_currencie IN loop_currencies %]
120                         <input type="hidden" name="[% loop_currencie.currency %]" value="[% loop_currencie.rate %]" />
121                     [% END %]
122
123                 [% IF ( items ) %]
124                 <fieldset class="rows">
125                     <legend>Item</legend>
126                     [% IF ( NoACQframework ) %]
127                         <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
128                     [% END %]
129
130                     [% FOREACH item IN items %]
131                     <div id="outeritemblock">
132                     <div id="itemblock">
133                         <ol>[% FOREACH iteminformatio IN item.iteminformation %]<li style="[% iteminformatio.hidden %];">
134                             <div class="subfield_line" id="subfield[% iteminformatio.serialid %][% iteminformatio.countitems %][% iteminformatio.subfield %][% iteminformatio.random %]">
135
136                                 <label>[% iteminformatio.subfield %] - [% IF ( iteminformatio.mandatory ) %]<b>[% END %][% iteminformatio.marc_lib %][% IF ( iteminformatio.mandatory ) %] *</b>[% END %]</label>
137                                 [% iteminformatio.marc_value %]
138                                 <input type="hidden" name="itemid" value="1" />
139                                 <input type="hidden" name="kohafield" value="[% iteminformatio.kohafield %]" />
140                                 <input type="hidden" name="tag" value="[% iteminformatio.tag %]" />
141                                 <input type="hidden" name="subfield" value="[% iteminformatio.subfield %]" />
142                                 <input type="hidden" name="mandatory" value="[% iteminformatio.mandatory %]" />
143                             </div></li>
144                         [% END %]
145                         </ol>
146                     </div><!-- /iteminformation -->
147                     </div>
148
149                     [% END %] <!-- /items -->
150                 </fieldset>
151                 [% END %] <!-- items -->
152                 <fieldset class="rows">
153                     <legend>Accounting details</legend>
154                     <ol>
155                         <li>
156                             <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, usefull when receiveing an order -->
157                             <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
158                         </li>
159                         <li>
160                             [% IF ( close ) %]
161                         <span class="label">Budget: </span>
162                                 <input type="hidden" size="20" name="budget_id" id="budget_id" value="[% budget_id %]" />[% Budget_name %]
163                             [% ELSE %]
164                             <li>
165                             <label for="currency">Currency:</label>
166                             <select name="currency" id="currency">
167                             [% FOREACH loop_currencie IN loop_currencies %]
168                                     [% IF ( loop_currencie.selected ) %]<option value="[% loop_currencie.currcode %]" selected="selected">[% loop_currencie.currcode %]</option>[% ELSE %]<option value="[% loop_currencie.currcode %]">[% loop_currencie.currcode %]</option>[% END %][% END %]
169                             </select>
170                             </li>
171                             <li>
172                             <label for="budget_id">Budget: </label>
173                             <select id="budget_id" onchange="fetchSortDropbox(this.form)" size="1" name="budget_id">
174                             [% FOREACH budget_loo IN budget_loop %]
175                                 [% IF ( budget_loo.b_sel ) %]
176                                     <option value="[% budget_loo.b_id %]" selected="selected">[% budget_loo.b_txt %]</option>
177                                 [% ELSE %]
178                                     <option value="[% budget_loo.b_id %]">[% budget_loo.b_txt %]</option>
179                                 [% END %]
180                             [% END %]
181                             </select>
182                             </li>
183                             [% END %]
184                         </li>
185                         <li>
186                             <label for="notes">Notes: </label>
187                             <textarea id="notes" cols="30" rows="3" name="notes"></textarea>
188                         </li>
189                         <li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
190                             <label for="sort1">Planning value1: </label>
191                             <span id="sort1_zone">
192                             [% IF CGIsort1 %]
193                                 <select id="sort1" size="1" name="sort1">
194                                 [% FOREACH sort_opt IN CGIsort1 %]
195                                     [% IF sort_opt.default %]
196                                         <option value="[% sort_opt.id %]" selected="selected">[% sort_opt.label %]</option>
197                                     [% ELSE %]
198                                         <option value="[% sort_opt.id %]">[% sort_opt.label %]</option>
199                                     [% END %]
200                                 [% END %]
201                                 </select>
202                             [% ELSE %]
203                                 <input type="text" id="sort1" size="20" name="sort1" value="[% sort1 %]" />
204                             [% END %]
205                             </span>
206                         </li>
207                         <li>
208                             <label for="sort2">Planning value2: </label>
209                             <span id="sort2_zone">
210                             [% IF CGIsort2 %]
211                                 <select id="sort2" size="1" name="sort1">
212                                 [% FOREACH sort_opt IN CGIsort2 %]
213                                     [% IF sort_opt.default %]
214                                         <option value="[% sort_opt.id %]" selected="selected">[% sort_opt.label %]</option>
215                                     [% ELSE %]
216                                         <option value="[% sort_opt.id %]">[% sort_opt.label %]</option>
217                                     [% END %]
218                                 [% END %]
219                                 </select>
220                             [% ELSE %]
221                                  <input type="text" id="sort2" size="20" name="sort2" value="[% sort2 %]" />
222                             [% END %]
223                             </span>
224                         </li>
225                         <li>
226                             
227                         </li>
228             </ol>
229                 </fieldset>
230                 <fieldset class="action">
231                     <input type="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Cancel</a>
232                 </fieldset>
233             </form>
234             </div>
235         [% END %]
236        </div>
237    </div>
238 </div>
239 </body>
240 </html>