annotate default/components/common.html @ 69:339f4011ed9b

merge-request: first draft: template for viewing a merge request (comments + patches) + a text explaining how to use jp to create a new one (new merge requests from inside Libervia is not handled yet).
author Goffi <goffi@goffi.org>
date Fri, 01 Dec 2017 00:46:45 +0100
parents 9834106678da
children ead4db120515
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 = {
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
3 'login': _('Session') if profile is defined else _('Log in'),
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'),
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
9 } %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
10
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
11 {% macro menu(menus, class='') %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
12 <nav class="menu {{class}}">
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
13 <ul>
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
14 {% for name,url in menus %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
15 <li><a class="menu_item button {{name}}" {{ {'href': url}|xmlattr }}>{{ml[name]}}</a></li>
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
16 {% endfor %}
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
17 </ul>
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
18 </nav>
9834106678da base: menu implementation:
Goffi <goffi@goffi.org>
parents:
diff changeset
19 {% endmacro %}