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
|
<div id="topRightBar">
{% set helloAlias %}
{% if userAlias is not empty %}
{{ userAlias|raw }}
{% else %}
{{ userLogin|raw }}
{% endif %}
{% endset %}
{% macro userMenuItem(label, menu, currentModule, currentAction) %}
{% if (menu._url.module == currentModule and (menu._url.action is empty or menu._url.action == currentAction)) %}
<a class="active item"
{% if menu._tooltip is defined %}title="{{ menu._tooltip }}"{% endif %}
>{{ label|translate }}</a>
{% else %}
<a class="item"
href="index.php{{ menu._url|urlRewriteWithParameters }}"
{% if menu._tooltip is defined %}title="{{ menu._tooltip }}"{% endif %}
>{{ label|translate }}</a>
{% endif %}
{% endmacro %}
<span class="topBarElem">
<div id="userMenu"
title="{{ 'General_HelloUser'|translate(helloAlias|trim)|raw }}"
menu-title="{{ helloAlias|trim }}"
piwik-menudropdown>
{% if userLogin != 'anonymous' %}
{% if isAdminLayout is defined %}
<a class="item active">{{ 'General_Settings'|translate }}</a>
{% else %}
<a class="item" href="index.php?module=CoreAdminHome">{{ 'General_Settings'|translate }}</a>
{% endif %}
{% endif %}
{% for lev1UserLabel,lev1UserMenu in userMenu if lev1UserLabel|slice(0,1) != '_' %}
{% if userLogin != 'anonymous' or not loop.first %}
<hr class="item separator"/>
{% endif %}
{% if lev1UserMenu._hasSubmenu is defined and lev1UserMenu._hasSubmenu %}
{% for lev2Label,lev2Menu in lev1UserMenu if lev2Label|slice(0,1) != '_' %}
{{ _self.userMenuItem(lev2Label, lev2Menu, currentModule, currentAction) }}
{% endfor %}
{% else %}
{{ _self.userMenuItem(lev1UserLabel, lev1UserMenu, currentModule, currentAction) }}
{% endif %}
{% endfor %}
</div>
</span>
| <span class="topBarElem">
{% if userLogin == 'anonymous' %}
<a href='index.php?module={{ loginModule }}'>{{ 'Login_LogIn'|translate }}</a>
{% else %}
<a href='index.php?module={{ loginModule }}&action=logout'>{{ 'General_Logout'|translate }}</a>
{% endif %}
</span>
</div>
|