From 569cc1b73764849f089a53c29185cfd528d48989 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Thu, 7 Jul 2016 17:15:54 +0200 Subject: [PATCH] use theme primary in export header --- app/views/api/statistics/export_current.xlsx.axlsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/api/statistics/export_current.xlsx.axlsx b/app/views/api/statistics/export_current.xlsx.axlsx index eaddd9866..81fbdf2bb 100644 --- a/app/views/api/statistics/export_current.xlsx.axlsx +++ b/app/views/api/statistics/export_current.xlsx.axlsx @@ -1,6 +1,7 @@ wb = xlsx_package.workbook bold = wb.styles.add_style :b => true +header = wb.styles.add_style :b => true, :bg_color => Stylesheet.primary.upcase.gsub('#', 'FF'), :fg_color => 'FFFFFFFF' date = wb.styles.add_style :format_code => Rails.application.secrets.excel_date_format wb.add_worksheet(name: @index.label) do |sheet| @@ -23,7 +24,7 @@ wb.add_worksheet(name: @index.label) do |sheet| columns.push f.label end columns.push t('export.revenue') if @index.ca - sheet.add_row columns, :style => bold + sheet.add_row columns, :style => header # data rows @results['hits']['hits'].each do |hit|