From 1ed44768ab80ff47dff8b385b083c084d0aa57e2 Mon Sep 17 00:00:00 2001 From: Thomas Steur <tsteur@users.noreply.github.com> Date: Wed, 17 May 2017 08:07:22 +1200 Subject: [PATCH] Add possibility to specify column suffix in dataTable row (#11704) * Add possibility to specify column suffix in dataTable row In https://github.com/piwik/piwik/pull/11650 I added the possibility to define a column prefix to be displayed in the UI, this PR now also adds the same feature for suffix. * remove the trailing whitespace --- plugins/CoreHome/templates/_dataTableCell.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/CoreHome/templates/_dataTableCell.twig b/plugins/CoreHome/templates/_dataTableCell.twig index 2db3545136..3b771e596c 100644 --- a/plugins/CoreHome/templates/_dataTableCell.twig +++ b/plugins/CoreHome/templates/_dataTableCell.twig @@ -46,7 +46,7 @@ {{ piwik.logoHtml(row.getMetadata(), row.getColumn('label')) }} {% if row.getMetadata('html_label_prefix') %}<span class='label-prefix'>{{ row.getMetadata('html_label_prefix') | raw }} </span>{% endif -%} {% endif %}<span class="value"> - {%- if row.getColumn(column) or (column=='label' and row.getColumn(column) is same as("0")) %}{% if column=='label' %}{{- row.getColumn(column)|rawSafeDecoded -}}{% else %}{% if row.getMetadata('html_column_' ~ column ~ '_prefix') %}<span class='column-prefix'>{{ row.getMetadata('html_column_' ~ column ~ '_prefix') | raw }} </span>{% endif -%}{{- row.getColumn(column)|number(2,0)|rawSafeDecoded -}}{% endif %} + {%- if row.getColumn(column) or (column=='label' and row.getColumn(column) is same as("0")) %}{% if column=='label' %}{{- row.getColumn(column)|rawSafeDecoded -}}{% else %}{% if row.getMetadata('html_column_' ~ column ~ '_prefix') %}<span class='column-prefix'>{{ row.getMetadata('html_column_' ~ column ~ '_prefix') | raw }}</span>{% endif -%}{{- row.getColumn(column)|number(2,0)|rawSafeDecoded -}}{% if row.getMetadata('html_column_' ~ column ~ '_suffix') %}<span class='column-suffix'>{{ row.getMetadata('html_column_' ~ column ~ '_suffix') | raw }}</span>{% endif -%}{% endif %} {%- else -%}- {%- endif -%}</span> {% if column=='label' %}{%- if row.getMetadata('html_label_suffix') %}<span class='label-suffix'>{{ row.getMetadata('html_label_suffix') | raw }}</span>{% endif -%}</span>{% endif %} -- GitLab