{%- set subtablesAreDisabled = properties.show_goals_columns|default(false) and properties.disable_subtable_when_show_goals|default(false) -%} {%- set showingEmbeddedSubtable = properties.show_embedded_subtable is not empty and idSubtable|default(false) -%} {% if error is defined %} {{ error.message }} {% else %} {%- if not showingEmbeddedSubtable -%} {% include "@CoreHome/_dataTableHead.twig" %} {%- endif -%} {% if showingEmbeddedSubtable and dataTable.getRowsCount() == 0 %} {% if clientSideParameters is not defined or clientSideParameters.filter_pattern_recursive is not defined or not clientSideParameters.filter_pattern_recursive %} {% endif %} {% else %} {%- for rowId, row in dataTable.getRows() -%} {%- set rowHasSubtable = not subtablesAreDisabled and row.getIdSubDataTable() and properties.subtable_controller_action is not null -%} {%- set rowSubtableId = row.getMetadata('idsubdatatable_in_db')|default(row.getIdSubDataTable()) -%} {%- set isSummaryRow = rowId == constant('Piwik\\DataTable::ID_SUMMARY_ROW') -%} {%- set shouldHighlightRow = isSummaryRow 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 #} {%- set showRow = subtablesAreDisabled or not rowHasSubtable or not properties.show_expanded|default(false) or not properties.replace_row_with_subtable|default(false) -%} {% if showRow %} {% for column in properties.columns_to_display %} {% endfor %} {% endif %} {# display subtable if present and showing expanded datatable #} {% if properties.show_expanded|default(false) and rowHasSubtable %} {% include "@CoreVisualizations/_dataTableViz_htmlTable.twig" with {'dataTable': row.getSubtable(), 'idSubtable': rowSubtableId} %} {% endif %} {%- endfor -%} {% endif %} {%- if not showingEmbeddedSubtable -%}
{{ 'CoreHome_CategoryNoData'|translate }}
{% include "@CoreHome/_dataTableCell.twig" with properties %}
{%- endif -%} {% endif %}