Merge remote-tracking branch 'origin/new/bug_8382'
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / basketgroup.tt
index c651e00..65d3e6e 100644 (file)
@@ -1,6 +1,9 @@
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Basket Grouping for [% booksellername |html %]</title>
+<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>
@@ -99,7 +102,18 @@ function submitForm(form) {
  $(document).ready(function() {
   //  $("#toolbar").empty();
     yuiToolbar();
-    $("#basket_groups > ul").tabs();
+    $("#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
@@ -133,19 +147,19 @@ function yuiToolbar() {
 //]]>
 </script>
 </head>
-<body>
+<body id="acq_basketgroup" class="acq">
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'acquisitions-search.inc' %]
 
-<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 |html %]</a> &rsaquo; Basket Grouping</div>
+<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 |html %]</a> &rsaquo; Basket grouping</div>
 
 <div id="doc" class="yui-t7">
             
         <div class="yui-b"> 
                <div id="toolbar">
-                               <a href="?op=add&amp;booksellerid=[% booksellerid %]" name="newbasketgroup" id="newbasketgroup">New Basket Group</a>
+                <a href="?op=add&amp;booksellerid=[% booksellerid %]" name="newbasketgroup" id="newbasketgroup">New basket group</a>
                        </div>
-                       <h1>Basket Grouping for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername |html %]</a></h1>
+            <h1>Basket grouping for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername |html %]</a></h1>
                </div>
 [% IF ( grouping ) %]
        <div id="bd"> 
@@ -156,7 +170,7 @@ function yuiToolbar() {
                    <div id="groups">
                    <fieldset class="brief">
                    <div class="workarea_alt" >
-                   <h3>Ungrouped Baskets</h3>
+                <h3>Ungrouped baskets</h3>
                    <ul id="ungrouped" class="draglist_alt">
                    [% IF ( baskets ) %]
                        [% FOREACH basket IN baskets %]
@@ -185,16 +199,17 @@ function yuiToolbar() {
                        <form action="" method="post" id="groupingform" onsubmit="return submitForm(this)">
                                        <fieldset id="various" class="brief">
                                        <ol>
-                                               <li><label for="basketgroupname">Basket Group Name:</label>
+                        <li><label for="basketgroupname">Basket group name:</label>
                                                        <input type="text" name="basketgroupname" id="basketgroupname" value="[% name %]" /></li>
-                                               <li><label for="billingplace">Billing Place:</label>
+                        <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%]
                                                                [% END %]
                                                                                                </select></li>
-                                               <li><label for="deliveryplace">Delivery Place:</label>
+                        <li><label for="deliveryplace">Delivery place:</label>
                                                        <select name="deliveryplace" id="deliveryplace" style="width:13em;">
                                                                <option value="">--</option>
                                                                [% FOREACH deliveryplaceloo IN deliveryplaceloop %]
@@ -203,7 +218,7 @@ function yuiToolbar() {
                                                                [% END %]
                                                                                                </select></li>
                         <li><p>or</p></li>
-                        <li><label for="freedeliveryplace">Delivery Place:</label>
+                        <li><label for="freedeliveryplace">Delivery place:</label>
                             <textarea cols="26" rows="3" name="freedeliveryplace" id="freedeliveryplace">[% freedeliveryplace %]</textarea></li>
                                                <li><label for="deliverycomment">Delivery comment:</label>
                                                        <textarea cols="26" rows="3" name="deliverycomment" id="deliverycomment">[% deliverycomment %]</textarea>
@@ -250,10 +265,10 @@ 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>
@@ -267,13 +282,11 @@ function yuiToolbar() {
                                                                                                [% END %]</a>
                                                </td>
                                                        <td>
+                              <span>
                                                                <input type="button" onclick="closeandprint([% basketgroup.id %])" value="Close and Print" />
-                                                       </td>
-                                                       <td>
                                                                <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,7 +306,7 @@ 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 ) %]
+                    <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=reopen&amp;booksellerid=[% basketgroup.booksellerid %]&amp;basketgroupid=[% basketgroup.id %]">[% IF ( basketgroup.name ) %]
                                                                                        [% basketgroup.name %]
                                                                                [% ELSE %]
                                                                                        Basket group no. [% basketgroup.id %]
@@ -301,10 +314,9 @@ function yuiToolbar() {
                                        </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 %]