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:
authorThomas Steur <thomas.steur@gmail.com>2015-10-07 15:31:27 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-10-07 15:31:27 +0300
commit6f465eb01c10d578a4ad038dc003cfe194d7a218 (patch)
tree3ee00692f89cb2ba923115d74036ee3ae0144c68 /plugins/CoreHome/templates/_topBar.twig
parent10d482f1d3deb4c717fbb87f523428196634a326 (diff)
various fixes for left menu, code tweaks and documented new method to register icons
Diffstat (limited to 'plugins/CoreHome/templates/_topBar.twig')
-rw-r--r--plugins/CoreHome/templates/_topBar.twig8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/CoreHome/templates/_topBar.twig b/plugins/CoreHome/templates/_topBar.twig
index c6d7141d92..e69e9c1978 100644
--- a/plugins/CoreHome/templates/_topBar.twig
+++ b/plugins/CoreHome/templates/_topBar.twig
@@ -1,9 +1,9 @@
{{ postEvent("Template.beforeTopBar", userAlias, userLogin, topMenu, userMenu) }}
<ul class="navbar-right">
- {% macro menuItemLabel(label) %}
- {% if label starts with 'icon-' %}
- <span class="{{ label|striptags }}"></span>
+ {% macro menuItemLabel(label, icon) %}
+ {% if icon is defined and icon and icon starts with 'icon-' %}
+ <span class="{{ icon|striptags }}"></span>
{% else %}
{{ label|translate }}
{% endif %}
@@ -16,7 +16,7 @@
<a {% if menu._tooltip is defined %}title="{{ menu._tooltip }}"{% endif %}
class="topBarElem {% if (menu._url.module == currentModule and (menu._url.action is empty or menu._url.action == currentAction)) %}active{% endif %}"
id="topmenu-{{ menu._url.module|lower }}"
- href="index.php{{ menu._url|urlRewriteWithParameters }}">{{ _self.menuItemLabel(label) }}</a>
+ href="index.php{{ menu._url|urlRewriteWithParameters }}">{{ _self.menuItemLabel(label, menu._icon) }}</a>
{% endif %}
{% endmacro %}