このコミットが含まれているのは:
@@ -167,13 +167,13 @@ class CountsTableExport
|
||||
cols = @query.axes.columns
|
||||
leading = [row_count, cols.any? ? 1 : 0].max
|
||||
columns = page.fetch(:column_headers)
|
||||
Array.new([cols.length, 1].max) do |level|
|
||||
headings = Array.new([cols.length, 1].max) do |level|
|
||||
prefix = Array.new(leading) { level.zero? ? @headers[_1].to_s : '' }
|
||||
prefix = [''] if row_count.zero? && cols.any?
|
||||
prefix + columns.each_with_index.map do |header, index|
|
||||
values = header[:values]
|
||||
if cols.empty?
|
||||
header[:kind] == 'data' ? @labels.fetch('count', '') : total_label(header)
|
||||
@labels.fetch('count', '')
|
||||
elsif level == values.length && header[:kind] != 'data'
|
||||
total_label(header)
|
||||
elsif level < values.length
|
||||
@@ -188,6 +188,25 @@ class CountsTableExport
|
||||
end
|
||||
end
|
||||
end
|
||||
return headings if cols.empty?
|
||||
|
||||
cols.each_index.flat_map do |level|
|
||||
prefix = Array.new(leading, '')
|
||||
prefix = headings.first.first(leading) if level.zero?
|
||||
names = columns.each_with_index.map do |header, index|
|
||||
next '' if header[:values].length < level
|
||||
|
||||
previous = index.positive? ? columns[index - 1][:values] : nil
|
||||
if (previous && previous.length >= level &&
|
||||
previous.first(level) == header[:values].first(level))
|
||||
''
|
||||
else
|
||||
@headers[row_count + level].to_s
|
||||
end
|
||||
end
|
||||
headings[level] = Array.new(leading, '') + headings[level].drop(leading) if level.zero?
|
||||
[prefix + names, headings[level]]
|
||||
end
|
||||
end
|
||||
|
||||
def pivot_cell(row, column, page)
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする