blob: 459ccb611e268f2c116adb1f6f8bf0faa42ca774 (
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
|
<div id="topRightBar">
{% macro topMenuItem(label, menu, currentModule, currentAction) %}
{% if menu._html is defined %}
{{ menu._html|raw }}
{% elseif (menu._url.module == currentModule and (menu._url.action is empty or menu._url.action == currentAction)) %}
<span class="topBarElem topBarElemActive"><strong>{{ label|translate }}</strong></span>
{% else %}
<span class="topBarElem" {% if menu._tooltip is defined %}title="{{ menu._tooltip }}"{% endif %}>
<a id="topmenu-{{ menu._url.module|lower }}" href="index.php{{ menu._url|urlRewriteWithParameters }}">{{ label|translate }}</a>
</span>
{% endif %}
{% endmacro %}
{% macro userMenuItem(label, menu, currentModule, currentAction) %}
<a class="item {% if (menu._url.module == currentModule and (menu._url.action is empty or menu._url.action == currentAction)) %}active{% endif %}"
href="index.php{{ menu._url|urlRewriteWithParameters }}"
id="usermenu-{{ menu._url.module|lower }}-{{ menu._url.action|default('index')|lower }}"
{% if menu._tooltip is defined %}title="{{ menu._tooltip }}"{% endif %}
>{{ label|translate }}</a>
{% endmacro %}
{% if topMenuModule is not defined %}
{% set topMenuModule = currentModule %}
{% set topMenuAction = currentAction %}
{% endif %}
{% for label,menu in topMenu %}
{% if not loop.first %}
|
{% endif %}
{{ _self.topMenuItem(label, menu, topMenuModule, topMenuAction) }}
{% endfor %}
</div>
|