Bug 10716: fix JavaScript error on basket groups page
[koha-ffzg.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / basketgroup.tt
index deb20e9..0dfd1c0 100644 (file)
@@ -1,9 +1,15 @@
+[% USE KohaBranchName %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Basket grouping for [% booksellername |html %]</title>
 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
 [% INCLUDE 'doc-head-close.inc' %]
 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
+[% INCLUDE 'datatables-strings.inc' %]
 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
+<script type="text/javascript" src="[% yuipath %]/utilities/utilities.js"></script>
+<script type="text/javascript" src="[% yuipath %]/button/button-min.js"></script>
+<script type="text/javascript" src="[% yuipath %]/container/container_core-min.js"></script>
+<script type="text/javascript" src="[% yuipath %]/menu/menu-min.js"></script>
 <script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
 [% IF ( grouping ) %]
 <script type="text/javascript" src="[% yuipath %]/yahoo-dom-event/yahoo-dom-event.js"></script>
@@ -90,6 +96,12 @@ fieldset.various li {
 //<![CDATA[
        YAHOO.util.Event.onDOMReady(DDApp.init, DDApp, true);
 
+var MSG_CONFIRM_CLOSE_BASKETGROUP = _("Are you sure you want to close this basketgroup?");
+var MSG_CLOSE_EMPTY_BASKET = _("Why close an empty basket?");
+var MSG_SAVE_BEFORE_PRINTING = _("You need to save the page before printing");
+var MSG_REOPEN_BASKETGROUP = _("reopen basketgroup");
+var MSG_FILE_DOWNLOAD_ERROR = _("Error downloading the file");
+
 function submitForm(form) {
     if (form.close.checked == true) {
        var input = document.createElement("input");
@@ -107,10 +119,8 @@ function submitForm(form) {
         "aoColumnDefs": [
             { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
         ],
-        "bAutoWidth": false,
-        "bPaginate": false,
-        "bInfo": false,
-        "bFilter": false,
+        sDom: 't',
+        "bAutoWidth": false
     } ));
 
  });
@@ -246,7 +256,12 @@ function submitForm(form) {
         <table id="basket_group_opened">
                        <thead>
                                <tr>
-                    <th>Basket group</th><th>Action</th>
+                                        <th>Name</th>
+                                        <th>Number</th>
+                                        <th>Billing place</th>
+                                        <th>Delivery place</th>
+                                        <th>Number of baskets</th>
+                                        <th>Action</th>
                                </tr>
                        </thead>
                        <tbody>
@@ -259,6 +274,10 @@ function submitForm(form) {
                                                                                                        Basket group no. [% basketgroup.id %]
                                                                                                [% END %]
                                                </td>
+                                    <td>[% basketgroup.id %]</td>
+                                    <td>[% basketgroup.billingplace | $KohaBranchName %]</td>
+                                    <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% basketgroup.deliveryplace | $KohaBranchName %][% END %]</td>
+                                    <td>[% basketgroup.basketsqty %]</td>
                                                        <td>
                                                                <input type="button" onclick="closeandprint([% basketgroup.id %])" value="Close and print" />
                                                                <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="add" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Edit" /></form>
@@ -274,7 +293,12 @@ function submitForm(form) {
         <table id="basket_group_closed">
                        <thead>
                                <tr>
-                    <th>Basket group</th><th>Action</th>
+                                        <th>Name</th>
+                                        <th>Number</th>
+                                        <th>Billing place</th>
+                                        <th>Delivery place</th>
+                                        <th>Number of baskets</th>
+                                        <th>Action</th>
                                </tr>
                        </thead>
                        <tbody>
@@ -288,6 +312,10 @@ function submitForm(form) {
                                                                                        Basket group no. [% basketgroup.id %]
                                                                                [% END %]
                                        </td>
+                                    <td>[% basketgroup.id %]</td>
+                                    <td>[% basketgroup.billingplace | $KohaBranchName %]</td>
+                                    <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% basketgroup.deliveryplace | $KohaBranchName %][% END %]</td>
+                                    <td>[% basketgroup.basketsqty %]</td>
                                        <td>
                                                        <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="reopen" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Reopen" /></form>
                                                        <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="print" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Print" /></form>