Bug 20966: (follow-up) Add template variable filter; Fix table export
authorOwen Leonard <oleonard@myacpl.org>
Mon, 29 Oct 2018 13:40:20 +0000 (13:40 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Tue, 13 Nov 2018 16:29:45 +0000 (16:29 +0000)
This patch makes to corrections:

1. The "$raw" filter has been added to the column configuration
2. The columns configuration now specifies which columns are exported in
   Copy, Excel, etc. operations.

To test, apply the patch and test the various table export buttons on a
both a closed and open basket. Confirm that the 'Modify' and 'Cancel'
columns are not exported.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

https://bugs.koha-community.org/show_bug.cgi?id=20996

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

admin/columns_settings.yml
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt

index a372fc1..299fe97 100644 (file)
@@ -76,6 +76,8 @@ modules:
           columnname: ecost_tax_included
           is_hidden: 1
         -
+          columnname: replacement_price
+        -
           columnname: quantity
         -
           columnname: total_tax_excluded
index f7048b2..f098dfe 100644 (file)
         [% END %]
     [% END %]
     <script>
-<<<<<<< HEAD
-=======
-        var columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'basket', 'orders', 'json' ) %];
->>>>>>> Bug 20966: Add column configuration to table of orders in a basket
+        var columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'basket', 'orders', 'json' ) | $raw %];
         $(document).ready(function() {
             KohaTable("orders", {
                 [% IF ( active ) %]
                     ],
                 [% END %]
                 "sPaginationType": "four_button",
-                "autoWidth": false
+                "autoWidth": false,
+                "exportColumns": [0,1,2,3,4,5,6,7,8,9,10,11,12,13]
             }, columns_settings);
 
             var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, {