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