diff options
author | Lukas Winkler <git@lw1.at> | 2020-06-04 14:47:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-04 14:47:54 +0300 |
commit | a35070be5146539999fdd02d5323f466d314192b (patch) | |
tree | a7f280e0f371f5b5370547b67ae63d142e341126 /plugins/CoreHome/templates | |
parent | 2851045e2ffd0f71fa1a56b2b6cab35cc7b1b4ab (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/CoreHome/templates')
-rw-r--r-- | plugins/CoreHome/templates/_dataTableActions.twig | 4 | ||||
-rw-r--r-- | plugins/CoreHome/templates/_dataTableCell.twig | 4 | ||||
-rw-r--r-- | plugins/CoreHome/templates/_topBar.twig | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/plugins/CoreHome/templates/_dataTableActions.twig b/plugins/CoreHome/templates/_dataTableActions.twig index aa549d84de..7322800fc7 100644 --- a/plugins/CoreHome/templates/_dataTableActions.twig +++ b/plugins/CoreHome/templates/_dataTableActions.twig @@ -11,7 +11,7 @@ {% set visualizationIcons %} <ul id='dropdownVisualizations{{ randomIdForDropdown }}' class='dropdown-content dataTableFooterIcons'> {% for footerIconGroup in footerIcons %} - {% for footerIcon in footerIconGroup.buttons if footerIcon.icon %} + {% for footerIcon in footerIconGroup.buttons|filter(footerIcon => footerIcon.icon) %} <li> {% set numIcons = numIcons + 1 %} {% set isActiveEcommerceView = clientSideParameters.abandonedCarts is defined and @@ -152,4 +152,4 @@ </li> {% endif %} </ul> - {% endif %}
\ No newline at end of file + {% endif %} diff --git a/plugins/CoreHome/templates/_dataTableCell.twig b/plugins/CoreHome/templates/_dataTableCell.twig index 7c72b57385..2021a75262 100644 --- a/plugins/CoreHome/templates/_dataTableCell.twig +++ b/plugins/CoreHome/templates/_dataTableCell.twig @@ -1,4 +1,4 @@ -{% spaceless %} +{% apply spaceless %} {% set tooltipIndex = column ~ '_tooltip' %} {% if row.getMetadata(tooltipIndex) %}<span class="cell-tooltip" data-tooltip="{{ row.getMetadata(tooltipIndex) }}">{% endif %} {% if not row.getIdSubDataTable() and column=='label' and row.getMetadata('url') %} @@ -38,4 +38,4 @@ {% endif %} {% if row.getMetadata(tooltipIndex) %}</span>{% endif %} -{% endspaceless %} +{% endapply %} diff --git a/plugins/CoreHome/templates/_topBar.twig b/plugins/CoreHome/templates/_topBar.twig index 5a8acade30..598a511c02 100644 --- a/plugins/CoreHome/templates/_topBar.twig +++ b/plugins/CoreHome/templates/_topBar.twig @@ -30,11 +30,11 @@ {% set topMenuAction = currentAction %} {% endif %} - {% spaceless %} + {% apply spaceless %} {% for label,menu in topMenu %} <li role="menuitem" class="{{ _self.isActiveItem(menu, topMenuModule, topMenuAction) }}">{{ _self.topMenuItem(label, menu._icon, menu) }}</li> {% endfor %} - {% endspaceless %} + {% endapply %} </ul> <ul class="side-nav hide-on-large-only" id="mobile-top-menu"> {% for label,menu in topMenu %} |