Bug 8853: Suppress links in basketgroups list
[koha-ffzg.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / basketgroup.tt
index 9ab47f3..b0a7a92 100644 (file)
@@ -1,6 +1,9 @@
 [% 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>
+<script type="text/javascript" src="[% themelang %]/js/datatables.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>
@@ -100,6 +103,17 @@ function submitForm(form) {
   //  $("#toolbar").empty();
     yuiToolbar();
     $("#basket_groups").tabs();
+
+    $("table").dataTable($.extend(true, {}, dataTablesDefaults, {
+        "aoColumnDefs": [
+            { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
+        ],
+        "bAutoWidth": false,
+        "bPaginate": false,
+        "bInfo": false,
+        "bFilter": false,
+    } ));
+
  });
 
 // YUI Toolbar Functions
@@ -189,6 +203,7 @@ function yuiToolbar() {
                                                        <input type="text" name="basketgroupname" id="basketgroupname" value="[% name %]" /></li>
                         <li><label for="billingplace">Billing place:</label>
                                                        <select name="billingplace" id="billingplace" style="width:13em;">
+                                <option value="">--</option>
                                                                [% FOREACH billingplaceloo IN billingplaceloop %]
                                        [% IF ( billingplaceloo.selected ) %]<option value="[% billingplaceloo.value %]" selected="selected">[% billingplaceloo.branchname %]</option>
                                        [% ELSE %]<option value="[% billingplaceloo.value %]">[% billingplaceloo.branchname %]</option>[% END%]
@@ -250,30 +265,28 @@ function yuiToolbar() {
         [% ELSE %]<li><a href="#closed">Closed</a></li>[% END %]
     </ul>
     <div id="opened">
-               <table>
+        <table id="basket_group_opened">
                        <thead>
                                <tr>
-                    <th>Basket group</th><th colspan="3">Action</th>
+                    <th>Basket group</th><th>Action</th>
                                </tr>
                        </thead>
                        <tbody>
                        [% FOREACH basketgroup IN basketgroups %]
                                [% UNLESS ( basketgroup.closed ) %]
                                        <tr>
-                                               <td><a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&amp;booksellerid=[% basketgroup.booksellerid %]&amp;basketgroupid=[% basketgroup.id %]">[% IF ( basketgroup.name ) %]
+                                               <td>[% IF ( basketgroup.name ) %]
                                                                                                        [% basketgroup.name %]
                                                                                                [% ELSE %]
                                                                                                        Basket group no. [% basketgroup.id %]
-                                                                                               [% END %]</a>
+                                                                                               [% END %]
                                                </td>
                                                        <td>
-                                                               <input type="button" onclick="closeandprint([% basketgroup.id %])" value="Close and Print" />
-                                                       </td>
-                                                       <td>
+                              <span>
+                                                               <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>
-                                                       </td>
-                                                       <td>
                                                                <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="delete" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Delete" /></form>
+                              </span>
                                                        </td>
                                        </tr>
                                [% END %]
@@ -282,10 +295,10 @@ function yuiToolbar() {
                </table>
     </div>
     <div id="closed">
-               <table>
+        <table id="basket_group_closed">
                        <thead>
                                <tr>
-                    <th>Basket group</th><th colspan="3">Action</th>
+                    <th>Basket group</th><th>Action</th>
                                </tr>
                        </thead>
                        <tbody>
@@ -293,18 +306,17 @@ function yuiToolbar() {
                                [% IF ( basketgroup.closed ) %]
                                <tr>
                                <td>
-                    <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=reopen&amp;booksellerid=[% basketgroup.booksellerid %]&amp;basketgroupid=[% basketgroup.id %]">[% IF ( basketgroup.name ) %]
+                                     [% IF ( basketgroup.name ) %]
                                                                                        [% basketgroup.name %]
                                                                                [% ELSE %]
                                                                                        Basket group no. [% basketgroup.id %]
-                                                                               [% END %]</a>
+                                                                               [% END %]
                                        </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>
-                                               </td>
-                                               <td>
                                                        <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>
-                                               </td>
+                                                        <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="export" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Export as CSV" /></form>
+                    </td>
                                </tr>
                                [% END %]
                                [% END %]