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