Bug 12138 - Use placeholders in translatable Javascript strings
[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 [% INCLUDE 'datatables.inc' %]
13 <script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
14 <script type="text/javascript" src="[% themelang %]/js/cataloging.js"></script>
15 <script type="text/JavaScript">
16 //<![CDATA[
17     [% IF (dateformat == 'metric') %]
18         dt_add_type_uk_date();
19     [% END %]
20     $(document).ready(function() {
21         var srlt = $("#files").dataTable($.extend(true, {}, dataTablesDefaults, {
22             "aoColumns": [
23                 null,null,null,{ "sType": "title-string" },null,null
24             ],
25             "aoColumnDefs": [
26                 { "aTargets": [ 5 ], "bSortable": false, "bSearchable": false },
27             ],
28             "sPaginationType": "four_button",
29             "aaSorting": []
30         } ) );
31
32         $("form#Aform").submit(function() {
33             var total_errors = CheckMandatorySubfields(this);
34             if (total_errors > 0) {
35                 var alertString  = _("Form not submitted because of the following problem(s)");
36                 alertString += "\n------------------------------------------------------------------------------------\n";
37                 alertString += "\n- " + _("%s mandatory fields empty (highlighted)").format(total_errors);
38                 alert(alertString);
39                 return false;
40             }
41             return true;
42         });
43     });
44 //]]>
45 </script>
46 </head>
47 <body id="acq_addorderiso2709" class="acq">
48 [% INCLUDE 'header.inc' %]
49 [% INCLUDE 'acquisitions-search.inc' %]
50 <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>
51 <div id="doc3" class="yui-t2">
52    <div id="bd">
53        <div id="yui-main">
54            <div class="yui-b">
55              [% IF ( batch_details ) %]
56                   <h1>Add orders from [% comments %]
57                     ([% file_name %] staged on [% upload_timestamp | $KohaDates with_hours => 1 %])
58                   </h1>
59                <div>
60                    <form action="[% scriptname %]" method="post" name="import_biblios">
61                      <table>
62                      <tr>
63                          <th>Citation</th>
64                          <th>Match?</th>
65                          <th>Order</th>
66                        </tr>
67                        [% FOREACH biblio_lis IN biblio_list %]
68                          <tr>
69                              <td>
70                                 [% biblio_lis.citation %]
71
72                              </td>
73                              <td>
74                                 [% IF ( biblio_lis.overlay_status == 'no_match' ) %]
75                                     No match
76                                 [% ELSIF ( biblio_lis.overlay_status == 'match_applied' ) %]
77                                     Match applied
78                                 [% ELSIF ( biblio_lis.overlay_status == 'auto_match' ) %]
79                                     Match found
80                                 [% ELSE %]
81                                     [% biblio_lis.overlay_status %]
82                                 [% END %]
83                              </td>
84                              <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>
85                          </tr>
86      [% IF ( biblio_lis.match_biblionumber ) %]
87     <tr>
88       <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>
89     </tr>
90     [% END %]
91                       [% END %]
92                      </table>
93                    </form>
94                </div>
95               [% IF ( pages ) %]
96                 <div class="pages">
97                 Page 
98                   [% FOREACH page IN pages %]
99                     [% IF ( page.current_page ) %]
100                       <span class="current">[% page.page_number %]</span>
101                     [% ELSE %]
102                       <a class="nav" href="[% page.script_name %]?import_batch_id=[% page.import_batch_id %]&amp;offset=[% page.offset %]">[% page.page_number %]</a>
103                     [% END %]
104                   [% END %]
105               [% END %]
106              [% ELSE %]
107                <div>
108                 <h1>Choose the file to add to the basket</h1>
109                    <table id="files">
110                      <thead>
111                      <tr>
112                        <th>File name</th>
113                        <th>Comments</th>
114                        <th>Status</th>
115                        <th>Staged</th>
116                        <th># Bibs</th>
117                        <th>&nbsp;</th>
118                      </tr>
119                      </thead>
120                      <tbody>
121                      [% FOREACH batch_lis IN batch_list %]
122                      <tr>
123                         <td>[% batch_lis.file_name %]</td>
124                        <td>[% batch_lis.comments %]</td>
125                        <td>
126                         [% IF ( batch_lis.import_status == 'cleaned' ) %]
127                             Cleaned
128                         [% ELSIF ( batch_lis.import_status == 'imported' ) %]
129                             Imported
130                         [% ELSIF ( batch_lis.import_status == 'importing' ) %]
131                             Importing
132                         [% ELSIF ( batch_lis.import_status == 'reverted' ) %]
133                             Reverted
134                         [% ELSIF ( batch_lis.import_status == 'reverting' ) %]
135                             Reverting
136                         [% ELSIF ( batch_lis.import_status == 'staged' ) %]
137                             Staged
138                         [% ELSE %]
139                             [% batch_lis.import_status %]
140                         [% END %]
141                        </td>
142                        <td><span title="[% batch_lis.staged_date %]">[% batch_lis.staged_date | $KohaDates with_hours => 1 %]</span></td>
143                        <td>[% batch_lis.num_biblios %]</td>
144                        <td><a href="[% batch_lis.scriptname %]?import_batch_id=[% batch_lis.import_batch_id %]&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]">Add orders</a></td>
145                      </tr>
146                      [% END %]
147                      </tbody>
148                    </table>
149                </div>
150              [% END %]
151            </div>
152         [% IF ( import_batch_id ) %]
153             <div class="yui-b">
154             <h2>Import all</h2>
155             <p>Import all the lines in the basket with the following parameters:</p>
156             <form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform">
157                     <input type="hidden" name="op" value="import_records"/>
158                     <input type="hidden" name="ordernumber" value="[% ordernumber %]" />
159                     <input type="hidden" name="basketno" value="[% basketno %]" />
160                     <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
161                     <input type="hidden" name="import_batch_id" value="[% import_batch_id %]" />
162
163                     [% FOREACH loop_currencie IN loop_currencies %]
164                         <input type="hidden" name="[% loop_currencie.currency %]" value="[% loop_currencie.rate %]" />
165                     [% END %]
166
167                 [% IF ( items ) %]
168                 <fieldset class="rows">
169                     <legend>Item</legend>
170                     [% IF ( NoACQframework ) %]
171                         <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
172                     [% END %]
173
174                     [% FOREACH item IN items %]
175                     <div id="outeritemblock">
176                     <div id="itemblock">
177                         <ol>[% FOREACH iteminformatio IN item.iteminformation %]<li style="[% iteminformatio.hidden %];">
178                             <div class="subfield_line" id="subfield[% iteminformatio.serialid %][% iteminformatio.countitems %][% iteminformatio.subfield %][% iteminformatio.random %]">
179                                 [% IF (iteminformatio.mandatory) %]
180                                     <label class="required">[% iteminformatio.subfield %] - [% iteminformatio.marc_lib %]</label>
181                                 [% ELSE %]
182                                     <label>[% iteminformatio.subfield %] - [% iteminformatio.marc_lib %]</label>
183                                 [% END %]
184                                 [% iteminformatio.marc_value %]
185                                 <input type="hidden" name="itemid" value="1" />
186                                 <input type="hidden" name="kohafield" value="[% iteminformatio.kohafield %]" />
187                                 <input type="hidden" name="tag" value="[% iteminformatio.tag %]" />
188                                 <input type="hidden" name="subfield" value="[% iteminformatio.subfield %]" />
189                                 <input type="hidden" name="mandatory" value="[% iteminformatio.mandatory %]" />
190                                 [% IF ( iteminformatio.mandatory ) %] <span class="required">Required</span>[% END %]
191                             </div></li>
192                         [% END %]
193                         </ol>
194                     </div><!-- /iteminformation -->
195                     </div>
196
197                     [% END %] <!-- /items -->
198                 </fieldset>
199                 [% END %] <!-- items -->
200                 <fieldset class="rows">
201                     <legend>Accounting details</legend>
202                     <ol>
203                         <li>
204                             <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, usefull when receiveing an order -->
205                             <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
206                         </li>
207                         <li>
208                             [% IF ( close ) %]
209                         <span class="label">Budget: </span>
210                                 <input type="hidden" size="20" name="budget_id" id="budget_id" value="[% budget_id %]" />[% Budget_name %]
211                             [% ELSE %]
212                             <li>
213                             <label for="currency">Currency:</label>
214                             <select name="currency" id="currency">
215                             [% FOREACH loop_currencie IN loop_currencies %]
216                                     [% 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 %]
217                             </select>
218                             </li>
219                             <li>
220                             <label for="budget_id">Budget: </label>
221                             <select id="budget_id" onchange="fetchSortDropbox(this.form)" size="1" name="budget_id">
222                             [% FOREACH budget_loo IN budget_loop %]
223                                 [% IF ( budget_loo.b_sel ) %]
224                                     <option value="[% budget_loo.b_id %]" selected="selected">[% budget_loo.b_txt %]</option>
225                                 [% ELSE %]
226                                     <option value="[% budget_loo.b_id %]">[% budget_loo.b_txt %]</option>
227                                 [% END %]
228                             [% END %]
229                             </select>
230                             </li>
231                             [% END %]
232                         </li>
233                         <li>
234                             <label for="order_internalnote">Internal note: </label>
235                             <textarea id="order_internalnote" cols="30" rows="3" name="order_internalnote"></textarea>
236                         </li>
237                         <li>
238                             <label for="order_vendornote">Vendor note: </label>
239                             <textarea id="order_vendornote" cols="30" rows="3" name="order_vendornote"></textarea>
240                         </li>
241                         <li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
242                             <label for="sort1">Planning value1: </label>
243                             <span id="sort1_zone">
244                             [% IF CGIsort1 %]
245                                 <select id="sort1" size="1" name="sort1">
246                                 [% FOREACH sort_opt IN CGIsort1 %]
247                                     [% IF sort_opt.default %]
248                                         <option value="[% sort_opt.id %]" selected="selected">[% sort_opt.label %]</option>
249                                     [% ELSE %]
250                                         <option value="[% sort_opt.id %]">[% sort_opt.label %]</option>
251                                     [% END %]
252                                 [% END %]
253                                 </select>
254                             [% ELSE %]
255                                 <input type="text" id="sort1" size="20" name="sort1" value="[% sort1 %]" />
256                             [% END %]
257                             </span>
258                         </li>
259                         <li>
260                             <label for="sort2">Planning value2: </label>
261                             <span id="sort2_zone">
262                             [% IF CGIsort2 %]
263                                 <select id="sort2" size="1" name="sort1">
264                                 [% FOREACH sort_opt IN CGIsort2 %]
265                                     [% IF sort_opt.default %]
266                                         <option value="[% sort_opt.id %]" selected="selected">[% sort_opt.label %]</option>
267                                     [% ELSE %]
268                                         <option value="[% sort_opt.id %]">[% sort_opt.label %]</option>
269                                     [% END %]
270                                 [% END %]
271                                 </select>
272                             [% ELSE %]
273                                  <input type="text" id="sort2" size="20" name="sort2" value="[% sort2 %]" />
274                             [% END %]
275                             </span>
276                         </li>
277                         <li>
278                             
279                         </li>
280             </ol>
281                 </fieldset>
282                 <fieldset class="action">
283                     <input type="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Cancel</a>
284                 </fieldset>
285             </form>
286             </div>
287         [% END %]
288        </div>
289    </div>
290 </div>
291 </body>
292 </html>