diff options
author | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-08-08 07:23:03 +0400 |
---|---|---|
committer | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-08-08 07:23:03 +0400 |
commit | 1d09b2cbe273035c92b15f9e4b96aa88419cda81 (patch) | |
tree | e53b9c82c361baff3d672a6aec08db91bdfc4836 /plugins/CoreVisualizations/templates | |
parent | a06fb0b267a55a50dd859b658baa651d4d4db738 (diff) |
Refs #4041, fixing regressions & bugs in visualization refactor.
Diffstat (limited to 'plugins/CoreVisualizations/templates')
-rw-r--r-- | plugins/CoreVisualizations/templates/_dataTableViz_htmlTable.twig | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/plugins/CoreVisualizations/templates/_dataTableViz_htmlTable.twig b/plugins/CoreVisualizations/templates/_dataTableViz_htmlTable.twig index 1347218af0..a5ba98ac72 100644 --- a/plugins/CoreVisualizations/templates/_dataTableViz_htmlTable.twig +++ b/plugins/CoreVisualizations/templates/_dataTableViz_htmlTable.twig @@ -1,13 +1,20 @@ +{%- set subtablesAreDisabled = properties.visualization_properties.show_goals_columns|default(false) + and properties.visualization_properties.disable_subtable_when_show_goals|default(false) -%} <table cellspacing="0" class="dataTable"> {% include "@CoreHome/_dataTableHead.twig" %} <tbody> {% for rowId, row in dataTable.getRows() %} - {%- set rowHasSubtable = row.getIdSubDataTable() and properties.subtable_controller_action is not null -%} + {%- set rowHasSubtable = not subtablesAreDisabled and row.getIdSubDataTable() and properties.subtable_controller_action is not null -%} {%- set shouldHighlightRow = rowId == constant('Piwik\\DataTable::ID_SUMMARY_ROW') and properties.highlight_summary_row -%} - + {# display this row if it doesn't have a subtable or if we don't replace the row with the subtable #} - {% if not rowHasSubtable or not properties.visualization_properties.show_expanded|default(false) or not properties.replace_row_with_subtable|default(false) %} + {%- set showRow = subtablesAreDisabled + or not rowHasSubtable + or not properties.visualization_properties.show_expanded|default(false) + or not properties.visualization_properties.replace_row_with_subtable|default(false) -%} + + {% if showRow %} <tr {% if rowHasSubtable %}id="{{ row.getIdSubDataTable() }}"{% endif %} class="{{ row.getMetadata('css_class') }} {% if rowHasSubtable %}subDataTable{% endif %}{% if shouldHighlightRow %} highlight{% endif %}"> {% for column in properties.columns_to_display %} |