Bug 10381: Followup adding some text around Apply/cancel filter.
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / booksellers.tt
index 26c15fc..525ea66 100644 (file)
@@ -1,3 +1,4 @@
+[% USE KohaDates %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Search for vendor [% supplier %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
@@ -17,23 +18,29 @@ $(document).ready(function() {
         dt_add_type_uk_date();
     [% END %]
     $("table.baskets").dataTable($.extend(true, {}, dataTablesDefaults, {
+        'sDom': 't',
         'bPaginate': false,
         'bFilter': false,
         'bInfo': false,
+        "aaSorting": [[ 1, "asc" ]],
         'aoColumnDefs': [
             { 'aTargets': [-1], 'bSortable': false }
         ]
     }));
+    $("#supplierlist").change(function() {
+        var id = $(this).find("option:selected").val();
+        window.location.href = "#" + id;
+    });
 });
 //]]>
 </script>
 
 </head>
-<body>
+<body id="acq_booksellers" 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; Search for Vendor <em>[% supplier %]</em> </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; Search for vendor <em>[% supplier %]</em> </div>
 
 <div id="doc3" class="yui-t2">
    
@@ -42,18 +49,23 @@ $(document).ready(function() {
     <div class="yui-b">
     
 [% INCLUDE 'acquisitions-toolbar.inc' %]
-[% IF ( count == 1 ) %]        
-<h1> [% supplier_name %] </h1>
-[% ELSE %]
+[% UNLESS ( count == 1 ) %]
 <h1>You searched on <b>vendor [% supplier %],</b> [% count %] results found</h1>
 [% END %]
 [% IF ( loop_suppliers.size ) %]
     [% UNLESS (count == 1) %]
-        <ul class="suppliers_anchors">
-            [% FOREACH supplier IN loop_suppliers %]
-                <li><a href="#[% supplier.booksellerid %]">[% supplier.name %]</a></li>
+        <p>Choose a vendor in the list to jump directly to the right place.
+        <select id="supplierlist">
+            [% FOREACH supplier1 IN loop_suppliers %]
+                <option value="[% supplier1.booksellerid %]">[% supplier1.name %]</option>
             [% END %]
-        </ul>
+        </select>
+        </p>
+    [% END %]
+    [% IF ( allbaskets ) %]
+        <p><a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&booksellerid=[% booksellerid %]">Show active baskets only</a></p>
+    [% ELSE %]
+        <p><a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&booksellerid=[% booksellerid %]&allbaskets=1">Show all baskets</a></p>
     [% END %]
     <div id="acqui_order_supplierlist">
         [% FOREACH supplier IN loop_suppliers %]
@@ -68,7 +80,7 @@ $(document).ready(function() {
                 <span class="action">
                     [% IF ( CAN_user_acquisition_order_manage ) %]
                         [% IF ( supplier.active ) %]
-                            <input type="button" value="New basket" onclick="window.location.href='/cgi-bin/koha/acqui/basketheader.pl?booksellerid=[% supplier.booksellerid %]&op=add_form'" />
+                            <input type="button" value="New basket" onclick="window.location.href='/cgi-bin/koha/acqui/basketheader.pl?booksellerid=[% supplier.booksellerid %]&amp;op=add_form'" />
                         [% ELSE %]
                             (inactive)
                         [% END %]
@@ -80,10 +92,11 @@ $(document).ready(function() {
                         <table class="baskets">
                             <thead>
                                 <tr>
-                                    <th>Basket (#)</th>
-                                    <th>Biblios</th>
-                                    <th>Items</th>
-                                    <th>Expected items</th>
+                                    <th>No.</th>
+                                    <th>Name</th>
+                                    <th>Item count</th>
+                                    <th>Biblio count</th>
+                                    <th>Items expected</th>
                                     <th>Created by</th>
                                     <th>Date</th>
                                     <th>&nbsp;</th>
@@ -96,18 +109,19 @@ $(document).ready(function() {
                                     [% ELSE %]
                                         <tr>
                                     [% END %]
-                                        <td>[% basket.basketname %] (#[% basket.basketno %])</td>
-                                        <td>[% basket.total_biblios %]</td>
+                                        <td>[% basket.basketno %]</td>
+                                        <td>[% basket.basketname %]</td>
                                         <td>[% basket.total_items %]</td>
+                                        <td>[% basket.total_biblios %]</td>
                                         <td>[% basket.expected_items %]</td>
                                         <td>
                                             [% basket.authorisedby_firstname %]
                                             [% basket.authorisedby_surname %]
                                         </td>
-                                        <td>[% basket.creationdate %]</td>
+                                        <td>[% basket.creationdate | $KohaDates %]</td>
                                         <td>
                                             [% IF ( basket.closedate ) %]
-                                                closed on [% basket.closedate %]
+                                                closed on [% basket.closedate | $KohaDates %]
                                                 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]">View</a>
                                             [% ELSE %]
                                                 [% IF ( basket.active ) %]
@@ -132,6 +146,9 @@ $(document).ready(function() {
 </div>
 </div>
 <div class="yui-b">
+[% IF ( booksellerid ) %]
+[% INCLUDE 'vendor-menu.inc' %]
+[% END %]
 [% INCLUDE 'acquisitions-menu.inc' %]
 </div>
 </div>