Files
pillar/src/templates/menus/user_base.pug

51 lines
1.1 KiB
Plaintext
Raw Normal View History

| {% block menu_body %}
| {% if current_user.is_authenticated %}
2018-08-28 15:52:50 +02:00
li.dropdown
| {% block menu_avatar %}
a.navbar-item.dropdown-toggle(href="#", data-toggle="dropdown", title="{{ current_user.email }}")
current-user-avatar
script.
new Vue({el: 'current-user-avatar'})
| {% endblock menu_avatar %}
2018-08-28 15:52:50 +02:00
ul.dropdown-menu.dropdown-menu-right
| {% if not current_user.has_role('protected') %}
| {% block menu_list %}
li
a.navbar-item.px-2(
href="{{ url_for('projects.home_project') }}"
title="My cloud")
| #[i.pi-home] My cloud
li
2018-09-12 19:00:29 +02:00
a.navbar-item.px-2(
href="{{ url_for('settings.profile') }}"
title="Settings")
2018-08-31 19:31:36 +02:00
| #[i.pi-cog] Settings
| {% endblock menu_list %}
2018-08-28 15:52:50 +02:00
li.dropdown-divider(role="separator")
| {% endif %}
li
a.navbar-item(
2018-09-12 19:00:29 +02:00
href="{{ url_for('users.logout') }}")
i.pi-log-out(title="Log Out")
| Log out
2018-09-12 19:00:29 +02:00
a.navbar-item.subitem.pt-0(
href="{{ url_for('users.switch') }}")
i.pi-blank
| Not {{ current_user.full_name }}?
| {% else %}
li.pr-1
2018-08-31 19:31:36 +02:00
a.btn.btn-sm.btn-outline-primary.px-3(
href="{{ url_for('users.login') }}")
| Log In
| {% endif %}
| {% endblock menu_body %}