removing useless code (copied from addbiblio)
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / addorderiso2709.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Acquisitions &rsaquo; Order Staged MARC Records
3 <!-- TMPL_IF name="batch_details" -->
4  &rsaquo; Batch <!-- TMPL_VAR name="import_batch_id" -->
5 <!-- TMPL_ELSE -->
6  &rsaquo; Batch List
7 <!-- /TMPL_IF -->
8 </title>
9 <!-- <script type="text/javascript" src="<!-- TMPL_VAR NAME='themelang' -->/js/additem.js"></script> -->
10 <script type="text/javascript">
11 //need to override cloneItemBlock to not generate a random itemid
12 function cloneItemBlock(index) {    
13     var original = document.getElementById('itemblock-' + index); //original <div>
14     var clone = original.cloneNode(true);
15     var random = Math.floor(Math.random()*100000); // get a random itemid.
16     // set the attribute for the new 'div' subfields
17     clone.setAttribute('id','itemblock-' + index + '-' + random);//set another id.
18     var NumTabIndex;
19     NumTabIndex = parseInt(original.getAttribute('tabindex'));
20     if(isNaN(NumTabIndex)) NumTabIndex = 0;
21     clone.setAttribute('tabindex',NumTabIndex+1);
22     var CloneButtonPlus;
23     var CloneButtonMinus;
24         CloneButtonPlus = clone.getElementsByTagName('a')[0];
25         CloneButtonPlus.setAttribute('onclick',"cloneItemBlock('" + index  + '-' +  random + "')");
26     CloneButtonMinus = clone.getElementsByTagName('a')[1];
27     CloneButtonMinus.setAttribute('onclick',"deleteItemBlock('" + index + '-' + random + "')");
28     CloneButtonMinus.setAttribute('style',"display:inline");
29     // change itemids of the clone
30     var elems = clone.getElementsByTagName('input');
31     for( i = 0 ; elems[i] ; i++ )
32     {
33         if(elems[i].name.match(/^itemid/)) {
34             elems[i].value += "-" + random;
35         }
36     }
37     var itemid = index.split("-");
38     itemid=itemid[0];
39     original.parentNode.insertBefore(clone,original.nextSibling);
40     var quantityrec = document.getElementById('quantityrec-' + itemid);
41     quantityrec.setAttribute('value',parseFloat(quantityrec.getAttribute('value'))+1);
42 }
43 function deleteItemBlock(index) {
44     var aDiv = document.getElementById('itemblock-' + index);
45     var elems = aDiv.getElementsByTagName('input');
46     var itemid = index.split("-");
47     itemid=itemid[0];
48     aDiv.parentNode.removeChild(aDiv);
49     var quantityrec = document.getElementById('quantityrec-' + itemid);
50     quantityrec.setAttribute('value',parseFloat(quantityrec.getAttribute('value'))-1);
51 }
52 </script>
53 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
54 <body>
55 <!-- TMPL_INCLUDE NAME="header.inc" -->
56 <!-- TMPL_INCLUDE NAME="acquisitions-search.inc" -->
57 <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?supplierid=<!-- TMPL_VAR NAME="booksellerid" -->"><!-- TMPL_VAR NAME="booksellername" --></a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR name="basketno" -->">Basket #<!-- TMPL_VAR name="basketno" --></a> &rsaquo;  Add orders from iso2709 file</div>
58 <div id="doc3" class="yui-t2">
59    <div id="bd">
60        <div id="yui-main">
61            <div class="yui-b">
62              <h1>Add orders from iso2709 file</h1>
63              <!-- TMPL_IF name="batch_details" -->
64                <h2>From batch id <!-- TMPL_VAR name="import_batch_id" --></h2>
65                <div>
66                      <dl>
67                        <dd><strong>File name</strong><!-- TMPL_VAR name="file_name" --></dd>
68                        <dd><strong>Comments</strong><!-- TMPL_VAR name="comments" --></dd>
69                        <dd><strong>Staged</strong><!-- TMPL_VAR name="upload_timestamp" --></dd>
70                      </dl>
71                </div>
72                <div>
73                    <form action="<!--TMPL_VAR name="scriptname" -->" method="post" name="import_biblios">
74                      <table>
75                      <tr>
76                          <th>#</th>
77                          <th>Citation</th>
78                          <th>Match?</th>
79                          <th>Order?</th>
80                        </tr>
81                        <!-- TMPL_LOOP name="biblio_list" -->
82                          <tr>
83                              <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=<!-- TMPL_VAR name="import_record_id" -->" rel="gb_page_center[600,500]"><!-- TMPL_VAR name="record_sequence"--></a></td>
84                              <td>
85                                 <!-- TMPL_VAR name="citation"-->
86                                     <!-- TMPL_IF name="items" -->
87                                     <fieldset class="rows">
88                                         <label>Itemtype</label>
89                                         <select id="itemtype-<!-- TMPL_VAR name="import_record_id" -->" name="itemtype-<!-- TMPL_VAR name="import_record_id" -->" >
90                                             <!-- TMPL_LOOP name="itemtypes" -->
91                                                 <option value="<!-- TMPL_VAR name="itemtype" -->"><!-- TMPL_VAR name="description" --></option>
92                                             <!-- /TMPL_LOOP -->
93                                         </select>
94                                         <!-- TMPL_LOOP NAME="items" -->
95                                         <div id="outeritemblock">
96                                         <div id="itemblock-<!-- TMPL_VAR name="import_record_id" -->">
97                                             <ol><!-- TMPL_LOOP NAME="iteminformation" --><li>
98                                                 <div class="subfield_line" style="<!-- TMPL_VAR NAME='hidden' -->;" id="subfield<!-- TMPL_VAR NAME='serialid' --><!-- TMPL_VAR NAME='countitems' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->">
99                                                     <label><!-- TMPL_VAR NAME="subfield" --> - <!-- TMPL_IF name="mandatory" --><b><!-- /TMPL_IF --><!-- TMPL_VAR NAME="marc_lib" --><!-- TMPL_IF name="mandatory" --> *</b><!-- /TMPL_IF --></label>
100                                                     <!-- TMPL_VAR NAME="marc_value" -->
101                                                     <input type="hidden" name="itemid" value="<!-- TMPL_VAR name="import_record_id" -->" />
102                                                     <input type="hidden" name="kohafield" value="<!-- TMPL_VAR NAME="kohafield" -->" />
103                                                     <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->" />
104                                                     <input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="subfield" -->" />
105                                                     <input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->" />
106                                                     <!-- TMPL_IF NAME="ITEM_SUBFIELDS_ARE_NOT_REPEATABLE" -->
107                                                         <span class="buttonPlus" onclick="CloneSubfield('subfield<!-- TMPL_VAR NAME='serialid' --><!-- TMPL_VAR NAME='countitems' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->')">+</span>
108                                                     <!-- /TMPL_IF -->
109                                                 </div></li>
110                                             <!-- /TMPL_LOOP-->
111                                             </ol>
112                                             <a style="cursor: pointer; color: grey; font-size: 180%;" onclick="cloneItemBlock('<!-- TMPL_VAR name="import_record_id" -->')">+</a>
113                                             <a style="display:none; cursor: pointer; color: grey; font-size: 180%;" onclick="deleteItemBlock('itemblock-<!-- TMPL_VAR name="import_record_id" -->')">-</a>
114                                         </div><!-- /iteminformation -->
115                                         </div>
116                                         
117                                         <input type="hidden" name="quantityrec-<!-- TMPL_VAR name="import_record_id" -->" id="quantityrec-<!-- TMPL_VAR name="import_record_id" -->" value="1" />
118                                         <!--/TMPL_LOOP--> <!-- /items -->
119                                     </fieldset>
120                                     <!-- /TMPL_IF --> <!-- items -->
121
122                              </td>
123                              <td><!-- TMPL_VAR name="overlay_status"--></td>
124                              <td><input type="checkbox" name="order-<!-- TMPL_VAR name="import_record_id" -->" value="1" checked /></td>
125                          </tr>
126                          <!-- TMPL_IF name="match_biblionumber" -->
127                            <tr>
128                              <td />
129                              <td class="highlight" colspan="3">Matches biblio <!-- TMPL_VAR name="match_biblionumber" --> (score = <!-- TMPL_VAR name="match_score" -->): <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name="match_biblionumber" -->"><!-- TMPL_VAR name="match_citation" --></a></td>
130                            </tr>
131                          <!-- /TMPL_IF -->
132                        <!-- /TMPL_LOOP -->
133                      </table>
134                      <input type="hidden" name="op" value="import_records" />
135                      <input type="hidden" name="import_batch_id" value="<!-- TMPL_VAR name="import_batch_id" -->" />
136                      <input type="hidden" name="basketno" value="<!-- TMPL_VAR name="basketno" -->" />
137                      <input type="button" value="Save" onclick="this.form.submit()" />
138                    </form>
139                </div>
140               <!-- TMPL_IF name="pages" -->
141                 <div class="pages">
142                 Page 
143                   <!-- TMPL_LOOP name="pages" -->
144                     <!-- TMPL_IF name="current_page" -->
145                       <span class="current"><!-- TMPL_VAR name="page_number" --></span>
146                     <!-- TMPL_ELSE -->
147                       <a class="nav" href="<!-- TMPL_VAR name="script_name" -->?import_batch_id=<!-- TMPL_VAR name="import_batch_id" -->&offset=<!-- TMPL_VAR name="offset" -->"><!-- TMPL_VAR name="page_number" --></a>
148                     <!-- /TMPL_IF -->
149                   <!-- /TMPL_LOOP -->
150               <!-- /TMPL_IF -->
151              <!-- TMPL_ELSE -->
152                <div>
153                    <table>
154                      <tr>
155                        <th>#</th>
156                        <th>File name</th>
157                        <th>Comments</th>
158                        <th>Status</th>
159                        <th>Staged</th>
160                        <th># Bibs</th>
161                        <th># Items</th>
162                      </tr>
163                      <!-- TMPL_LOOP name="batch_list" -->
164                      <tr>
165                        <td><a href="<!-- TMPL_VAR name="scriptname" -->?import_batch_id=<!-- TMPL_VAR name="import_batch_id" -->&basketno=<!-- TMPL_VAR name="basketno" -->"><!-- TMPL_VAR name="import_batch_id" --></a></td>
166                        <td><!-- TMPL_VAR name="file_name" --></td>
167                        <td><!-- TMPL_VAR name="comments" --></td>
168                        <td><!-- TMPL_VAR name="import_status" --></td>
169                        <td><!-- TMPL_VAR name="upload_timestamp" --></td>
170                        <td><!-- TMPL_VAR name="num_biblios" --></td>
171                        <td><!-- TMPL_VAR name="num_items" --></td>
172                      </tr>
173                      <!-- /TMPL_LOOP -->
174                    </table>
175                </div>
176              <!-- /TMPL_IF -->
177            </div>
178        </div>
179    </div>
180 </div>
181 </body>
182 </html>