1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
{% macro menu(menu, anchorlink, cssClass, currentModule, currentAction) %}
<div id="secondNavBar" class="{{ cssClass }} z-depth-1">
<ul class="navbar hide-on-med-and-down" aria-label="{{ 'CoreHome_MainNavigation'|translate|e('html_attr') }}" role="menu">
{% for level1,level2 in menu %}
{% set hasSubmenuItem = false %}
{% for name,urlParameters in level2 %}
{% if name|slice(0,1) != '_' %}
{% set hasSubmenuItem = true %}
{% endif %}
{% endfor %}
{% if hasSubmenuItem %}
<li class="menuTab" role="menuitem">
<a class="item" tabindex="5">
<span class="menu-icon {{ level2._icon|default('icon-arrow-right') }}"></span>{{ level1|translate }}
<span class="hidden">
{{ 'CoreHome_Menu'|translate }}
</span>
</a>
<ul role="menu">
{% for name,urlParameters in level2 %}
{% if name|slice(0,1) != '_' %}
<li {% if urlParameters._url.module is defined and urlParameters._url.module == currentModule and urlParameters._url.action is defined and urlParameters._url.action == currentAction %}class="active"{% endif %}
role="menuitem"
>
<a class="item" tabindex="5" target="_self"
title="{{ urlParameters._tooltip|default('')|translate|e('html_attr') }}"
{% if urlParameters._onclick is defined and urlParameters._onclick %}
onclick="{{ urlParameters._onclick|e('html_attr') }};return false;"
{% endif %}
{% if urlParameters._url %}
href="index.php?{{ urlParameters._url|urlRewriteWithParameters|slice(1) }}"
{% endif %}>
{% if urlParameters._icon is defined and urlParameters._icon %}<span class="icon {{ urlParameters._icon|e('html_attr') }}" style="margin-right: 5px;"></span>{% endif %}
{{ name|translate }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
</li>
{% endif %}
{% endfor %}
</ul>
<ul id="mobile-left-menu" class="sidenav hide-on-large-only">
{% for level1,level2 in menu %}
{% set hasSubmenuItem = false %}
{% for name,urlParameters in level2 %}
{% if name|slice(0,1) != '_' %}
{% set hasSubmenuItem = true %}
{% endif %}
{% endfor %}
{% if hasSubmenuItem %}
<li class="no-padding">
<ul class="collapsible collapsible-accordion" piwik-side-nav="nav .activateLeftMenu">
<li>
<a class="collapsible-header">{{ level1|translate }}<i class="{{ level2._icon|default('icon-arrow-down') }}"></i></a>
<div class="collapsible-body">
<ul>
{% for name,urlParameters in level2 %}
{% if name|slice(0,1) != '_' %}
<li>
<a title="{{ urlParameters._tooltip|default('')|translate|e('html_attr') }}" target="_self"
href="index.php?{{ urlParameters._url|urlRewriteWithParameters|slice(1) }}">{{ name|translate }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
</li>
</ul>
{% endif %}
{% endfor %}
</li>
</ul>
</div>
{% endmacro %}
|