Debian Codegraph @

tests/templates/_nav.html

raw
1 {%- if _fs_is_user_authenticated(current_user) -%}
2 <p>{{ _fsdomain('Welcome') }} {{ current_user.calc_username() }}</p>
3 {%- endif %}
4 <ul>
5 <li><a href="{{ url_for('index') }}">Index</a></li>
6 <li><a href="{{ url_for('profile') }}">Profile</a></li>
7 {% if current_user and current_user.has_role('admin') -%}
8 <li><a href="{{ url_for('admin') }}">Admin</a></li>
9 {% endif -%}
10 {% if current_user and (current_user.has_role('admin') or current_user.has_role('editor')) -%}
11 <li><a href="{{ url_for('admin_or_editor') }}">Admin or Editor</a></li>
12 {% endif -%}
13 <li>
14 {%- if _fs_is_user_authenticated(current_user) -%}
15 <a href="{{ url_for('security.logout') }}">Log out</a>
16 {%- else -%}
17 <a href="{{ url_for('security.login') }}">Log in</a>
18 {%- endif -%}
19 </li>
20 </ul>