Bug 11027: (follow-up) hide link if no basketgroup and use real branch name
authorMathieu Saby <mathsabypro@gmail.com>
Sun, 2 Feb 2014 22:07:16 +0000 (23:07 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 21 Apr 2014 04:34:57 +0000 (04:34 +0000)
This patch is a answer to remarks made by QA:
- if there is no basketgroup for an order, the basketgroup
  column in lastorders.pl is now blank (instead of parentheses)
- the name of the branch is used instead of its code in the
  branch column

To test: check late orders, included and not included into basketgroup

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt

index c5341c2..8a3cd83 100644 (file)
@@ -1,4 +1,5 @@
 [% USE KohaDates %]
+[% USE Branches %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Acquisitions &rsaquo; Late orders</title>
 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
@@ -166,13 +167,15 @@ $(document).ready(function() {
                 [% END %]
             </td>
             <td>
-                [% IF ( CAN_user_acquisition_group_manage ) %]
-                    <a href="basketgroup.pl?op=add&booksellerid=[% lateorder.supplierid %]&basketgroupid=[% lateorder.basketgroupid %]" title="basketgroup">[% lateorder.basketgroupname %] ([% lateorder.basketgroupid %])</a>
-                [% ELSE %]
-                    [% lateorder.basketgroupname %] ([% lateorder.basketgroupid %])</a>
+                [% IF ( lateorder.basketgroupid ) %]
+                    [% IF ( CAN_user_acquisition_group_manage ) %]
+                        <a href="basketgroup.pl?op=add&booksellerid=[% lateorder.supplierid %]&basketgroupid=[% lateorder.basketgroupid %]" title="basketgroup">[% lateorder.basketgroupname %] ([% lateorder.basketgroupid %])</a>
+                    [% ELSE %]
+                        [% lateorder.basketgroupname %] ([% lateorder.basketgroupid %])</a>
+                    [% END %]
                 [% END %]
             </td>
-            <td>[% lateorder.branch %]
+            <td>[% Branches.GetName( lateorder.branch ) %]
             </td>
             <td>[% lateorder.budget %]
             </td>