Mercurial > libervia-templates
annotate default/components/common.html @ 82:6ba0129a9a4e
base: don't use default flag for common script (flags now default to "defer" following last changes in backend)
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 03 Jan 2018 01:12:16 +0100 |
parents | ead4db120515 |
children | 05b500bd6235 |
rev | line source |
---|---|
66 | 1 {# menu labels, map from menu names to labels #} |
2 {% set ml = { | |
76
ead4db120515
components/common: profile is now always set, so we just test if it evaluate to True to know if a user is logged
Goffi <goffi@goffi.org>
parents:
66
diff
changeset
|
3 'login': _('Session') if profile else _('Log in'), |
66 | 4 'blog_view': _('Blog'), |
5 'merge-requests_list': _('Merge requests'), | |
6 'merge-request_new': _('Create new merge request'), | |
7 'tickets_list': _('Tickets'), | |
8 'ticket_new': _('Create new ticket'), | |
9 } %} | |
10 | |
11 {% macro menu(menus, class='') %} | |
12 <nav class="menu {{class}}"> | |
13 <ul> | |
14 {% for name,url in menus %} | |
15 <li><a class="menu_item button {{name}}" {{ {'href': url}|xmlattr }}>{{ml[name]}}</a></li> | |
16 {% endfor %} | |
17 </ul> | |
18 </nav> | |
19 {% endmacro %} |