Bug 16005 - Standardize use of icons for delete and cancel operations
[srvgit] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / invoices.tt
index 578b7b3..e94f2c0 100644 (file)
@@ -2,7 +2,7 @@
 
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; Invoices</title>
-<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
+<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
 [% INCLUDE 'doc-head-close.inc' %]
 [% INCLUDE 'datatables.inc' %]
 [% INCLUDE 'calendar.inc' %]
 //<![CDATA[
 $(document).ready(function() {
     var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
-        sDom: "t",
+        bPaginate: false,
         aoColumnDefs: [
-            { "bSortable": false, "aTargets": [1, 8] },
+            { "bSortable": false, "aTargets": [1, -1] },
             { "bVisible": false, "aTargets": [0] },
             { "sType": "title-string", "aTargets" : [ "title-string" ] }
         ]
     }));
 
-    $("#show_only_subscription").attr("checked", false);
+    $("#show_only_subscription").prop("checked", false);
 
     $("#show_only_subscription").click(function(){
-        if ( $(this).attr("checked") ) {
+        if ( $(this).prop("checked") ) {
             resultst.fnFilter( "1", 0, true );
         } else {
             resultst.fnFilter( '', 0 );
@@ -81,7 +81,7 @@ $(document).ready(function() {
 </script>
 </head>
 
-<body>
+<body id="acq_invoices" class="acq">
 [% INCLUDE 'header.inc' %]
 [% INCLUDE 'acquisitions-search.inc' %]
 
@@ -106,6 +106,7 @@ $(document).ready(function() {
                 <th>&nbsp;</th>
                 <th>Invoice no.</th>
                 <th>Vendor</th>
+                <th class="title-string">Shipment date</th>
                 <th class="title-string">Billing date</th>
                 <th>Received biblios</th>
                 <th>Received items</th>
@@ -121,6 +122,13 @@ $(document).ready(function() {
                   <td><a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoice.invoiceid %]">[% invoice.invoicenumber %]</a></td>
                   <td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% invoice.booksellerid %]">[% invoice.suppliername %]</a></td>
                   <td>
+                    [% IF invoice.shipmentdate %]
+                      <span title="[% invoice.shipmentdate %]">[% invoice.shipmentdate | $KohaDates %]</span>
+                    [% ELSE %]
+                      <span title="0000-00-00"></span>
+                    [% END %]
+                  </td>
+                  <td>
                     [% IF invoice.billingdate %]
                       <span title="[% invoice.billingdate %]">[% invoice.billingdate | $KohaDates %]</span>
                     [% ELSE %]
@@ -143,14 +151,14 @@ $(document).ready(function() {
                              Actions <b class="caret"></b>
                           </a>
                           <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="invoiceactions[% invoice.invoiceid %]">
-                              <li><a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoice.invoiceid %]"><i class="icon-search"></i> Details</a></li>
+                              <li><a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoice.invoiceid %]"><i class="fa fa-search"></i> Details</a></li>
                             [% IF invoice.closedate %]
-                                <li><a href="invoice.pl?op=reopen&amp;invoiceid=[% invoice.invoiceid %]&amp;referer=/cgi-bin/koha/acqui/invoices.pl%3Fop=do_search%26invoicenumber=[% invoicenumber %]%26supplier=[% booksellerid %]%26billingdatefrom=[% billingdatefrom %]%26billingdateto=[% billingdateto %]%26isbneanissn=[% isbneanissn %]%26title=[% title %]%26author=[% author %]%26publisher=[% publisher %]%26publicationyear=[% publicationyear %]%26branch=[% branch %]"><i class="icon-refresh"></i> Reopen</a></li>
+                                <li><a href="invoice.pl?op=reopen&amp;invoiceid=[% invoice.invoiceid %]&amp;referer=/cgi-bin/koha/acqui/invoices.pl%3Fop=do_search%26invoicenumber=[% invoicenumber %]%26supplier=[% booksellerid %]%26shipmentdatefrom=[% shipmentdatefrom | $KohaDates %]%26shipmentdateto=[% shipmentdateto | $KohaDates %]%26billingdatefrom=[% billingdatefrom | $KohaDates %]%26billingdateto=[% billingdateto | $KohaDates %]%26isbneanissn=[% isbneanissn %]%26title=[% title %]%26author=[% author %]%26publisher=[% publisher %]%26publicationyear=[% publicationyear %]%26branch=[% branch %]"><i class="fa fa-refresh"></i> Reopen</a></li>
                             [% ELSE %]
-                                <li><a href="invoice.pl?op=close&amp;invoiceid=[% invoice.invoiceid %]&amp;referer=/cgi-bin/koha/acqui/invoices.pl%3Fop=do_search%26invoicenumber=[% invoicenumber %]%26supplier=[% booksellerid %]%26billingdatefrom=[% billingdatefrom %]%26billingdateto=[% billingdateto %]%26isbneanissn=[% isbneanissn %]%26title=[% title %]%26author=[% author %]%26publisher=[% publisher %]%26publicationyear=[% publicationyear %]%26branch=[% branch %]"><i class="icon-remove-sign"></i> Close</a></li>
+                                <li><a href="invoice.pl?op=close&amp;invoiceid=[% invoice.invoiceid %]&amp;referer=/cgi-bin/koha/acqui/invoices.pl%3Fop=do_search%26invoicenumber=[% invoicenumber %]%26supplier=[% booksellerid %]%26shipmentdatefrom=[% shipmentdatefrom | $KohaDates %]%26shipmentdateto=[% shipmentdateto | $KohaDates %]%26billingdatefrom=[% billingdatefrom | $KohaDates %]%26billingdateto=[% billingdateto | $KohaDates %]%26isbneanissn=[% isbneanissn %]%26title=[% title %]%26author=[% author %]%26publisher=[% publisher %]%26publicationyear=[% publicationyear %]%26branch=[% branch %]"><i class="fa fa-times-circle"></i> Close</a></li>
                             [% END %]
                             [% UNLESS invoice.receivedbiblios || invoice.receiveditems %]
-                                <li><a href="invoice.pl?op=delete&amp;invoiceid=[% invoice.invoiceid %]&amp;referer=/cgi-bin/koha/acqui/invoices.pl%3Fop=do_search%26invoicenumber=[% invoicenumber %]%26supplier=[% booksellerid %]%26billingdatefrom=[% billingdatefrom %]%26billingdateto=[% billingdateto %]%26isbneanissn=[% isbneanissn %]%26title=[% title %]%26author=[% author %]%26publisher=[% publisher %]%26publicationyear=[% publicationyear %]%26branch=[% branch %]"><i class="icon-remove"></i> Delete</a></li>
+                                <li><a href="invoice.pl?op=delete&amp;invoiceid=[% invoice.invoiceid %]&amp;referer=/cgi-bin/koha/acqui/invoices.pl%3Fop=do_search%26invoicenumber=[% invoicenumber %]%26supplier=[% booksellerid %]%26shipmentdatefrom=[% shipmentdatefrom | $KohaDates %]%26shipmentdateto=[% shipmentdateto | $KohaDates %]%26billingdatefrom=[% billingdatefrom | $KohaDates %]%26billingdateto=[% billingdateto | $KohaDates %]%26isbneanissn=[% isbneanissn %]%26title=[% title %]%26author=[% author %]%26publisher=[% publisher %]%26publicationyear=[% publicationyear %]%26branch=[% branch %]"><i class="fa fa-trash"></i> Delete</a></li>
                             [% END %]
                           </ul>
                       </div>
@@ -206,19 +214,35 @@ $(document).ready(function() {
               [% IF booksellerid %]
                 <li>Vendor: [% suppliername %]</li>
               [% END %]
-              [% IF ( billingdatefrom ) %]
+              [% IF shipmentdatefrom %]
+                <li>Shipment date:
+                [% IF shipmentdateto %]
+                  From [% shipmentdatefrom | $KohaDates %]
+                  To [% shipmentdateto | $KohaDates %]
+                [% ELSE %]
+                  All since [% shipmentdatefrom | $KohaDates %]
+                [% END %]
+                </li>
+              [% ELSE %]
+                [% IF shipmentdateto %]
+                  <li>Shipment date:
+                    All until [% shipmentdateto | $KohaDates %]
+                  </li>
+                [% END %]
+              [% END %]
+              [% IF billingdatefrom %]
                 <li>Billing date:
-                [% IF ( billingdateto ) %]
-                  From [% billingdatefrom %]
-                  To [% billingdateto %]
+                [% IF billingdateto %]
+                  From [% billingdatefrom | $KohaDates %]
+                  To [% billingdateto | $KohaDates %]
                 [% ELSE %]
-                  All since [% billingdatefrom %]
+                  All since [% billingdatefrom | $KohaDates %]
                 [% END %]
                 </li>
               [% ELSE %]
-                [% IF ( billingdateto ) %]
+                [% IF billingdateto %]
                   <li>Billing date:
-                    All until [% billingdateto %]
+                    All until [% billingdateto | $KohaDates %]
                   </li>
                 [% END %]
               [% END %]
@@ -276,11 +300,11 @@ $(document).ready(function() {
               <ol>
                 <li>
                   <label for="shipmentdatefrom">From:</label>
-                  <input type="text" id="shipmentdatefrom" name="shipmentdatefrom" size="10" value="[% shipmentdatefrom %]" class="datepicker" />
+                  <input type="text" id="shipmentdatefrom" name="shipmentdatefrom" size="10" value="[% shipmentdatefrom | $KohaDates %]" class="datepicker" />
                 </li>
                 <li>
                   <label for="shipmentdateto">To:</label>
-                  <input type="text" id="shipmentdateto" name="shipmentdateto" size="10" value="[% shipmentdateto %]" class="datepicker" />
+                  <input type="text" id="shipmentdateto" name="shipmentdateto" size="10" value="[% shipmentdateto | $KohaDates %]" class="datepicker" />
                 </li>
               </ol>
             </fieldset>
@@ -291,11 +315,11 @@ $(document).ready(function() {
               <ol>
                 <li>
                   <label for="billingdatefrom">From:</label>
-                  <input type="text" id="billingdatefrom" name="billingdatefrom" size="10" value="[% billingdatefrom %]" class="datepicker" />
+                  <input type="text" id="billingdatefrom" name="billingdatefrom" size="10" value="[% billingdatefrom | $KohaDates %]" class="datepicker" />
                 </li>
                 <li>
                   <label for="billingdateto">To:</label>
-                  <input type="text" id="billingdateto" name="billingdateto" size="10" value="[% billingdateto %]" class="datepicker" />
+                  <input type="text" id="billingdateto" name="billingdateto" size="10" value="[% billingdateto | $KohaDates %]" class="datepicker" />
                 </li>
               </ol>
             </fieldset>