Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Winkler <git@lw1.at>2020-06-04 14:47:54 +0300
committerGitHub <noreply@github.com>2020-06-04 14:47:54 +0300
commita35070be5146539999fdd02d5323f466d314192b (patch)
treea7f280e0f371f5b5370547b67ae63d142e341126 /plugins/CoreVisualizations
parent2851045e2ffd0f71fa1a56b2b6cab35cc7b1b4ab (diff)
Twig 3 upgrade (#15573)
* proof of concept of Twig 3 upgrade * some for if template fixes * potentially fix RenderTokenParser * comment out RenderTokenParser * clearCompiledTemplates() using unlinkRecursive() * macro imported in block and used in subblock is not valid twigphp/Twig#3090 * more template fixes * remove non existing clearTemplateCache() * add missing parameter to unlinkRecursive * Use custom MethodCallExpression to fix RenderTokenParser * increase minimum php version to 7.2.5 * submodule update * fix twig loop filter * updates expected UI files * fix twig loop filter * fix twig loop filter * fix neutral evolution check * fix macro usage * convert some conditions to filters * fix macro include * remove debug code as default logging is good enough * submodule updates Co-authored-by: sgiehl <stefan@matomo.org>
Diffstat (limited to 'plugins/CoreVisualizations')
-rw-r--r--plugins/CoreVisualizations/templates/_dataTableViz_tagCloud.twig6
-rw-r--r--plugins/CoreVisualizations/templates/macros.twig2
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/CoreVisualizations/templates/_dataTableViz_tagCloud.twig b/plugins/CoreVisualizations/templates/_dataTableViz_tagCloud.twig
index f9f51397e2..827135ba89 100644
--- a/plugins/CoreVisualizations/templates/_dataTableViz_tagCloud.twig
+++ b/plugins/CoreVisualizations/templates/_dataTableViz_tagCloud.twig
@@ -3,15 +3,15 @@
<span title="{{ value.word|rawSafeDecoded }} ({{ value.value }} {{ properties.translations[cloudColumn]|default(cloudColumn) }})" class="word size{{ value.size }}
{# we strike tags with 0 hits #}
{% if value.value == 0 %}valueIsZero{% endif %}">
- {% if labelMetadata[value.word].url is not sameas(false) %}
+ {% if labelMetadata[value.word].url is not same as(false) %}
<a href="{{ labelMetadata[value.word].url }}" rel="noreferrer noopener" target="_blank">
{% endif %}
- {% if labelMetadata[value.word].logo is not sameas(false) %}
+ {% if labelMetadata[value.word].logo is not same as(false) %}
<img src="{{ labelMetadata[value.word].logo }}" width="{{ value.logoWidth }}" />
{% else %}
{{ value.wordTruncated|rawSafeDecoded }}
{% endif %}
- {% if labelMetadata[value.word].url is not sameas(false) %}</a>{% endif %}
+ {% if labelMetadata[value.word].url is not same as(false) %}</a>{% endif %}
</span>
{% endfor %}
</div>
diff --git a/plugins/CoreVisualizations/templates/macros.twig b/plugins/CoreVisualizations/templates/macros.twig
index 2956f591b0..d6c5ad9f56 100644
--- a/plugins/CoreVisualizations/templates/macros.twig
+++ b/plugins/CoreVisualizations/templates/macros.twig
@@ -5,7 +5,7 @@
{% if evolution.percent < 0 %}
{% set evolutionClass = 'negative-evolution' %}
{% set evolutionIcon = 'arrow_down.png' %}
- {% elseif evolution.percent == 0 %}
+ {% elseif evolution.percent == 0 or evolution.percent == '0%' %}
{% set evolutionClass = 'neutral-evolution' %}
{% set evolutionIcon = 'stop.png' %}
{% else %}