annotate sat_templates/default/components/common.html @ 154:80cf52fbcc40

events: added admin, create and overview templates
author Goffi <goffi@goffi.org>
date Thu, 21 Jun 2018 01:11:07 +0200
parents 0ec76c1f53d3
children
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'),
131
c3f50951f2cc components: menu update
Goffi <goffi@goffi.org>
parents: 130
diff changeset
4 'blog': _('Blog'),
119
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents: 87
diff changeset
5 'forums': _('Forums'),
138
85877c76d47d merge-request: discovery page
Goffi <goffi@goffi.org>
parents: 135
diff changeset
6 'merge-requests': _('Merge requests'),
66
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
7 'merge-request_new': _('Create new merge request'),
135
24920d436e77 ticket: basic tickets discovery
Goffi <goffi@goffi.org>
parents: 131
diff changeset
8 'tickets': _('Tickets'),
139
909361c96a58 components (common/menu): fixed "List tickets" sub menu
Goffi <goffi@goffi.org>
parents: 138
diff changeset
9 'tickets_list': _('List tickets'),
66
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
10 'ticket_new': _('Create new ticket'),
85
05b500bd6235 chat: chat implementation, first draft:
Goffi <goffi@goffi.org>
parents: 76
diff changeset
11 'chat': _('Chat'),
130
1a590a16bd20 component(common): updated menu
Goffi <goffi@goffi.org>
parents: 119
diff changeset
12 'files': _('Files sharing'),
151
0ec76c1f53d3 components (common/menu): added events menu
Goffi <goffi@goffi.org>
parents: 149
diff changeset
13 'events': _('Events'),
154
80cf52fbcc40 events: added admin, create and overview templates
Goffi <goffi@goffi.org>
parents: 151
diff changeset
14 'event_new': _('Create an event'),
130
1a590a16bd20 component(common): updated menu
Goffi <goffi@goffi.org>
parents: 119
diff changeset
15 'photos': _('Photos albums'),
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
16 'app': _('Application'),
66
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
17 } %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
18
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
19 {% macro menu(menus, class='') %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
20 <nav class="menu {{class}}">
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
21 <ul>
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
22 {% for name,url in menus %}
149
e5ec33c4a8a8 forum/overview.html: classes modification + better global design
Goffi <goffi@goffi.org>
parents: 147
diff changeset
23 <li><a class="menu_item menu_item--{{name}}" {{ {'href': url}|xmlattr }}>{{ml[name]}}</a></li>
66
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
24 {% endfor %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
25 </ul>
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
26 </nav>
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
27 {% endmacro %}