annotate default/components/common.html @ 87:3ee775795cd0

app: simple page so show a link to heavy web application (i.e. pyjamas version)
author Goffi <goffi@goffi.org>
date Fri, 05 Jan 2018 14:35:36 +0100
parents 92ca411ee635
children b085ede4d9af
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
66
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
1 {# menu labels, map from menu names to labels #}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
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
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
4 'blog_view': _('Blog'),
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
5 'merge-requests_list': _('Merge requests'),
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
6 'merge-request_new': _('Create new merge request'),
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
7 'tickets_list': _('Tickets'),
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
8 'ticket_new': _('Create new ticket'),
85
05b500bd6235 chat: chat implementation, first draft:
Goffi <goffi@goffi.org>
parents: 76
diff changeset
9 'chat': _('Chat'),
87
3ee775795cd0 app: simple page so show a link to heavy web application (i.e. pyjamas version)
Goffi <goffi@goffi.org>
parents: 86
diff changeset
10 'app': _('Application'),
66
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
11 } %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
12
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
13 {% macro menu(menus, class='') %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
14 <nav class="menu {{class}}">
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
15 <ul>
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
16 {% for name,url in menus %}
86
92ca411ee635 chat: new chat_select page to select a jid to talk to + improved button style
Goffi <goffi@goffi.org>
parents: 85
diff changeset
17 <li><a class="menu_item {{name}}" {{ {'href': url}|xmlattr }}>{{ml[name]}}</a></li>
66
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
18 {% endfor %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
19 </ul>
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
20 </nav>
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
21 {% endmacro %}