Bug 5961: Filling a basket from the reservoir
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / addorderiso2709.tmpl
index 94637d1..1bd65e4 100644 (file)
@@ -8,6 +8,7 @@
 </title>
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="<!-- TMPL_VAR NAME='themelang' -->/js/acq.js"></script>
 <script type="text/JavaScript">
 //<![CDATA[
     $(document).ready(function() {
    <div id="bd">
        <div id="yui-main">
            <div class="yui-b">
-             <h1>Add orders from staged file: <!-- TMPL_VAR name="comments" --></h1>
              <!-- TMPL_IF name="batch_details" -->
-               <div>
-                     <dl>
-                       <dd><strong>File name:</strong> <!-- TMPL_VAR name="file_name" --></dd>
-                       <dd><strong>Staged on:</strong> <!-- TMPL_VAR name="upload_timestamp" --></dd>
-                     </dl>
-               </div>
+                  <h1>Add orders from <!-- TMPL_VAR name="comments" -->
+                    (<!-- TMPL_VAR name="file_name" --> staged on <!-- TMPL_VAR name="upload_timestamp" -->)
+                  </h1>
                <div>
                    <form action="<!--TMPL_VAR name="scriptname" -->" method="post" name="import_biblios">
                      <table>
                      <tr>
-                         <th>#</th>
                          <th>Citation</th>
                          <th>Match?</th>
                          <th>Order</th>
                        </tr>
                        <!-- TMPL_LOOP name="biblio_list" -->
                          <tr>
-                             <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>
                              <td>
                                 <!-- TMPL_VAR name="citation"-->
 
                              </td>
                              <td><!-- TMPL_VAR name="overlay_status"--></td>
-                             <td><a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=<!--TMPL_VAR name="booksellerid" -->&amp;basketno=<!-- TMPL_VAR name="basketno" -->&amp;booksellerid=<!-- TMPL_VAR name="booksellerid" -->&amp;breedingid=<!-- TMPL_VAR name="import_record_id" -->&amp;import_batch_id=<!-- TMPL_VAR name="import_batch_id" -->">Add order</a></td>
+                             <td><a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=<!--TMPL_VAR name="booksellerid" -->&amp;basketno=<!-- TMPL_VAR name="basketno" -->&amp;booksellerid=<!-- TMPL_VAR name="booksellerid" -->&amp;breedingid=<!-- TMPL_VAR name="import_record_id" -->&amp;import_batch_id=<!-- TMPL_VAR name="import_batch_id" -->&amp;biblionumber=<!-- TMPL_VAR name="match_biblionumber" -->">Add order</a></td>
                          </tr>
-                         <!-- TMPL_IF name="match_biblionumber" -->
-                           <tr>
-                             <td />
-                             <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>
-                           </tr>
-                         <!-- /TMPL_IF -->
-                       <!-- /TMPL_LOOP -->
+     <!-- TMPL_IF name="match_biblionumber" -->
+    <tr>
+      <td class="highlight" colspan="3">&nbsp;&nbsp;&nbsp;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>
+    </tr>
+    <!-- /TMPL_IF -->
+                      <!-- /TMPL_LOOP -->
                      </table>
-                     <input type="button" value="Save" onclick="this.form.submit()" />
                    </form>
                </div>
               <!-- TMPL_IF name="pages" -->
@@ -79,6 +72,7 @@
               <!-- /TMPL_IF -->
              <!-- TMPL_ELSE -->
                <div>
+                <h1>Choose the file to add to the basket</h1>
                    <table id="files">
                      <thead>
                      <tr>
                </div>
              <!-- /TMPL_IF -->
            </div>
+        <!-- TMPL_IF name="import_batch_id" -->
+            <div class="yui-b">
+            <h2>Import All</h2>
+            <p>Import all the lines in the basket with the following parameters:</p>
+            <form action="/cgi-bin/koha/acqui/addorderiso2709.pl" method="post" id="Aform">
+                    <input type="hidden" name="op" value="import_records"/>
+                    <input type="hidden" name="ordernumber" value="<!-- TMPL_VAR NAME="ordernumber" -->" />
+                    <input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->" />
+                    <input type="hidden" name="booksellerid" value="<!-- TMPL_VAR NAME="booksellerid" -->" />
+                    <input type="hidden" name="import_batch_id" value="<!-- TMPL_VAR name="import_batch_id" -->" />
+
+                    <!-- TMPL_LOOP NAME="loop_currencies" -->
+                        <input type="hidden" name="<!-- TMPL_VAR NAME="currency" -->" value="<!-- TMPL_VAR NAME="rate" -->" />
+                    <!-- /TMPL_LOOP -->
+
+                <!-- TMPL_IF name="items" -->
+                <fieldset class="rows">
+                    <legend>Item</legend>
+                    <!-- TMPL_IF name="NoACQframework" -->
+                        <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
+                    <!-- /TMPL_IF -->
+
+                    <!-- TMPL_LOOP NAME="items" -->
+                    <div id="outeritemblock">
+                    <div id="itemblock">
+                        <ol><!-- TMPL_LOOP NAME="iteminformation" --><li>
+                            <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" -->">
+
+                                <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>
+                                <!-- TMPL_VAR NAME="marc_value" -->
+                                <input type="hidden" name="itemid" value="1" />
+                                <input type="hidden" name="kohafield" value="<!-- TMPL_VAR NAME="kohafield" -->" />
+                                <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->" />
+                                <input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="subfield" -->" />
+                                <input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->" />
+                            </div></li>
+                        <!-- /TMPL_LOOP-->
+                        </ol>
+                    </div><!-- /iteminformation -->
+                    </div>
+
+                    <!--/TMPL_LOOP--> <!-- /items -->
+                </fieldset>
+                <!-- /TMPL_IF --> <!-- items -->
+                <fieldset class="rows">
+                    <legend>Accounting Details</legend>
+                    <ol>
+                        <li>
+                            <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, usefull when receiveing an order -->
+                            <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
+                        </li>
+                        <li>
+                            <!-- TMPL_IF name="close" -->
+                        <span class="label">Budget: </span>
+                                <input type="hidden" size="20" name="budget_id" id="budget_id" value="<!-- TMPL_VAR NAME="budget_id" -->" /><!-- TMPL_VAR NAME="Budget_name" -->
+                            <!-- TMPL_ELSE -->
+                            <li>
+                            <label for="currency">Currency:</label>
+                            <select name="currency" id="currency" onchange="calcNeworderTotal();">
+                            <!-- TMPL_LOOP name="loop_currencies" -->
+                                    <!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR name="currcode" -->" selected="selected"><!-- TMPL_VAR name="currcode" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="currcode" -->"><!-- TMPL_VAR name="currcode" --></option><!-- /TMPL_IF --><!-- /TMPL_LOOP -->
+                            </select>
+                            </li>
+                            <li>
+                            <label for="budget_id">Budget: </label>
+                            <select id="budget_id" onchange="fetchSortDropbox(this.form)" size="1" name="budget_id">
+                            <!-- TMPL_LOOP NAME="budget_loop" -->
+                                <!-- TMPL_IF NAME="b_sel" -->
+                                    <option value="<!-- TMPL_VAR NAME='b_id' -->" selected="selected"><!-- TMPL_VAR NAME="b_txt" --></option>
+                                <!-- TMPL_ELSE -->
+                                    <option value="<!-- TMPL_VAR NAME='b_id' -->"><!-- TMPL_VAR NAME="b_txt" --></option>
+                                <!-- /TMPL_IF -->
+                            <!-- /TMPL_LOOP -->
+                            </select>
+                            </li>
+                            <!--/TMPL_IF-->
+                        </li>
+                        <li>
+                            <label for="notes">Notes: </label>
+                            <textarea id="notes" cols="30" rows="3" name="notes"></textarea>
+                        </li>
+                        <li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
+                            <label for="sort1">Planning value1: </label>
+
+                            <!-- TMPL_IF Name="CGIsort1" -->
+                                <!-- TMPL_VAR Name="CGIsort1" -->
+                            <!-- TMPL_ELSE -->
+
+                                <input type="text" id="sort1" size="20" name="sort1" value="<!-- TMPL_VAR NAME="sort1" -->" />
+                            <!--/TMPL_IF -->
+                        </li>
+                        <li>
+                            <label for="sort2">Planning value2: </label>
+
+                            <!-- TMPL_IF Name="CGIsort2" -->
+                                <!-- TMPL_VAR Name="CGIsort2" -->
+                            <!-- TMPL_ELSE -->
+                                <input type="text" id="sort2" size="20" name="sort2" value="<!-- TMPL_VAR NAME="sort2" -->" />
+                            <!--/TMPL_IF -->
+                        </li>
+                        <li>
+                            
+                        </li>
+            </ol>
+                </fieldset>
+                <fieldset class="action">
+                    <input type="submit" value="Save" /><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->">Cancel</a>
+                </fieldset>
+            </form>
+            </div>
+        <!-- /TMPL_IF -->
        </div>
    </div>
 </div>