blob: 673c2ba1c8fb55228e07e89dfffbf70030ee7c76 (
plain)
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
|
{% macro menu(menu, anchorlink, cssClass, currentModule, currentAction) %}
<div id="secondNavBar" class="{{ cssClass }}">
<div id="search" ng-cloak>
<div piwik-quick-access class="borderedControl"></div>
</div>
<ul class="navbar" 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"
title="{{ urlParameters._tooltip|default('')|translate|e('html_attr') }}"
href="index.php?{{ urlParameters._url|urlRewriteWithParameters|slice(1) }}">
{{ name|translate }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
{% endmacro %}
|