Bug 15348: (follow-up) Fix breadcrumbs, title, JS error, permissions
authorAleisha Amohia <aleisha@catalyst.net.nz>
Fri, 7 May 2021 03:02:42 +0000 (15:02 +1200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 16 Sep 2022 13:36:53 +0000 (10:36 -0300)
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
acqui/addorder.pl
acqui/moddeliverydate.pl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/moddeliverydate.tt

index edea7a1..9d25f2b 100755 (executable)
@@ -137,7 +137,7 @@ use Koha::Acquisition::Currencies qw( get_active );
 use Koha::Acquisition::Orders;
 use Koha::Acquisition::Baskets;
 use C4::Barcodes;
-use Koha::DateUtils;
+use Koha::DateUtils q( dt_from_string );
 
 ### "-------------------- addorder.pl ----------"
 
index 48d5b5b..239a0fc 100755 (executable)
@@ -43,7 +43,7 @@ my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
     template_name   => 'acqui/moddeliverydate.tt',
     query           => $input,
     type            => 'intranet',
-    flagsrequired   => { 'acquisition' => '*' },
+    flagsrequired   => { 'acquisition' => 'order_manage' },
     debug           => 1,
 } );
 
index 6e2c17c..7f40b20 100644 (file)
             <td data-order="[% estimated_delivery_date | html %]">
                 <p class="delivery_date">
                     <span id="delivery_date_[% estimated_delivery_date | html %]">[% estimated_delivery_date | $KohaDates %]</span>
-                    <a class="edit_delivery_date noExport" data-ordernumber="[% lateorder.ordernumber | html %]" href="/cgi-bin/koha/acqui/moddeliverydate.pl?ordernumber=[% lateorder.ordernumber | html %]" title="Edit delivery date">
-                        <i class="fa fa-pencil"></i> Edit
-                    </a>
+                    [% IF CAN_user_acquisition_order_manage %]
+                        <a class="edit_delivery_date noExport" data-ordernumber="[% lateorder.ordernumber | html %]" href="/cgi-bin/koha/acqui/moddeliverydate.pl?ordernumber=[% lateorder.ordernumber | html %]" title="Edit delivery date">
+                            <i class="fa fa-pencil"></i> Edit
+                        </a>
+                    [% END %]
                 </p>
             </td>
             <td>
       </tbody>
       <tfoot>
         <tr>
-            <th colspan="7">Total</th>
+            <th colspan="6">Total</th>
             <th>[% total_quantity | html %]</th>
             <th>[% total | $Price %]</th>
             <th colspan="10">&nbsp;</th>
index 5d50976..c8075b1 100644 (file)
@@ -1,15 +1,31 @@
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Acquisition &rsaquo;
-    Change estimated delivery date
-</title>
+<title>Change estimated delivery date &rsaquo; Acquisitions &rsaquo; Koha</title>
 [% INCLUDE 'doc-head-close.inc' %]
 </head>
 
 <body id="acq_moddeliverydate" class="acq">
 [% INCLUDE 'header.inc' %]
 
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisition</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% booksellername | html %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Basket [% basketname | html %] ([% basketno | html %])</a> &rsaquo; Change estimated delivery date</div>
+<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
+    <ol>
+        <li>
+            <a href="/cgi-bin/koha/mainpage.pl">Home</a>
+        </li>
+        <li>
+            <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisition</a>
+        </li>
+        <li>
+            <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% booksellername | html %]</a>
+        </li>
+        <li>
+            <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Basket [% basketname | html %] ([% basketno | html %])</a>
+        </li>
+        <li>
+            <a href="#" aria-current="page">Change estimated delivery date</a>
+        </li>
+    </ol>
+</nav>
 
 <div class="main container-fluid">
     <div class="row">