2017-06-09 16:31:14 +02:00
|
|
|
| {% macro navigation_menu_user(current_user) %}
|
|
|
|
|
|
|
|
| {% if current_user.is_authenticated %}
|
|
|
|
|
|
|
|
| {% if current_user.has_role('demo') %}
|
|
|
|
| {% set subscription = 'demo' %}
|
2017-08-18 14:47:42 +02:00
|
|
|
| {% elif current_user.has_cap('subscriber') %}
|
2017-06-09 16:31:14 +02:00
|
|
|
| {% set subscription = 'subscriber' %}
|
|
|
|
| {% else %}
|
|
|
|
| {% set subscription = 'none' %}
|
|
|
|
| {% endif %}
|
|
|
|
|
|
|
|
li(class="dropdown")
|
|
|
|
a.navbar-item.dropdown-toggle(href="#", data-toggle="dropdown", title="{{ current_user.email }}")
|
|
|
|
img.gravatar(
|
|
|
|
src="{{ current_user.gravatar }}",
|
|
|
|
class="{{ subscription }}",
|
|
|
|
alt="Avatar")
|
|
|
|
.special(class="{{ subscription }}")
|
|
|
|
| {% if subscription == 'subscriber' %}
|
|
|
|
i.pi-check
|
|
|
|
| {% elif subscription == 'demo' %}
|
|
|
|
i.pi-heart-filled
|
|
|
|
| {% else %}
|
|
|
|
i.pi-attention
|
|
|
|
| {% endif %}
|
|
|
|
|
|
|
|
ul.dropdown-menu
|
|
|
|
| {% if not current_user.has_role('protected') %}
|
|
|
|
li.subscription-status(class="{{ subscription }}")
|
|
|
|
| {% if subscription == 'subscriber' %}
|
|
|
|
a.navbar-item(
|
2017-08-30 23:06:43 +02:00
|
|
|
href="{{url_for('settings.billing')}}"
|
2017-06-09 16:31:14 +02:00
|
|
|
title="View subscription info")
|
|
|
|
i.pi-grin
|
|
|
|
span Your subscription is active!
|
|
|
|
| {% elif subscription == 'demo' %}
|
|
|
|
a.navbar-item(
|
2017-08-30 23:06:43 +02:00
|
|
|
href="{{url_for('settings.billing')}}"
|
2017-06-09 16:31:14 +02:00
|
|
|
title="View subscription info")
|
|
|
|
i.pi-heart-filled
|
|
|
|
span You have a free account.
|
|
|
|
| {% else %}
|
|
|
|
a.navbar-item(
|
|
|
|
href="https://store.blender.org/product/membership/"
|
|
|
|
title="Renew subscription")
|
|
|
|
i.pi-unhappy
|
|
|
|
span.info Your subscription is not active.
|
|
|
|
span.renew Click here to renew.
|
|
|
|
| {% endif %}
|
|
|
|
|
|
|
|
li
|
|
|
|
a.navbar-item(
|
|
|
|
href="{{ url_for('projects.home_project') }}"
|
|
|
|
title="Home")
|
|
|
|
i.pi-home
|
|
|
|
| Home
|
|
|
|
|
|
|
|
li
|
|
|
|
a.navbar-item(
|
|
|
|
href="{{ url_for('projects.index') }}"
|
|
|
|
title="My Projects")
|
|
|
|
i.pi-star
|
|
|
|
| My Projects
|
2017-08-31 16:35:10 +02:00
|
|
|
|
2017-08-24 12:35:31 +02:00
|
|
|
| {% if current_user.has_organizations() %}
|
|
|
|
li
|
|
|
|
a.navbar-item(
|
|
|
|
href="{{ url_for('pillar.web.organizations.index') }}"
|
|
|
|
title="My Organizations")
|
|
|
|
i.pi-users
|
|
|
|
| My Organizations
|
|
|
|
| {% endif %}
|
2017-08-31 16:35:10 +02:00
|
|
|
|
2017-06-09 16:31:14 +02:00
|
|
|
li
|
|
|
|
a.navbar-item(
|
2017-08-30 23:06:43 +02:00
|
|
|
href="{{ url_for('settings.profile') }}"
|
2017-06-09 16:31:14 +02:00
|
|
|
title="Settings")
|
|
|
|
i.pi-cog
|
|
|
|
| Settings
|
2017-08-31 16:35:10 +02:00
|
|
|
|
2017-06-09 16:31:14 +02:00
|
|
|
li
|
|
|
|
a.navbar-item(
|
2017-08-30 23:06:43 +02:00
|
|
|
href="{{ url_for('settings.billing') }}"
|
2017-06-09 16:31:14 +02:00
|
|
|
title="Billing")
|
|
|
|
i.pi-credit-card
|
|
|
|
| Subscription
|
2017-08-31 16:35:10 +02:00
|
|
|
|
2017-06-09 16:31:14 +02:00
|
|
|
li.divider(role="separator")
|
|
|
|
| {% endif %}
|
2017-08-31 16:35:10 +02:00
|
|
|
|
2017-06-09 16:31:14 +02:00
|
|
|
li
|
|
|
|
a.navbar-item(
|
|
|
|
href="{{ url_for('users.logout') }}")
|
|
|
|
i.pi-log-out(title="Log Out")
|
|
|
|
| Log out
|
|
|
|
a.navbar-item.subitem(
|
|
|
|
href="{{ url_for('users.switch') }}")
|
|
|
|
i.pi-blank
|
|
|
|
| Not {{ current_user.full_name }}?
|
|
|
|
|
|
|
|
| {% else %}
|
|
|
|
|
|
|
|
li.nav-item-sign-in
|
|
|
|
a.navbar-item(href="{{ url_for('users.login') }}")
|
2017-10-25 15:45:13 +02:00
|
|
|
| Log in
|
2017-06-09 16:31:14 +02:00
|
|
|
| {% endif %}
|
|
|
|
|
|
|
|
| {% endmacro %}
|
|
|
|
|
|
|
|
|
|
|
|
| {% macro navigation_menu_notifications(current_user) %}
|
|
|
|
|
|
|
|
| {% if current_user.is_authenticated %}
|
|
|
|
|
|
|
|
li.nav-notifications
|
|
|
|
a.navbar-item#notifications-toggle(
|
|
|
|
title="Notifications",
|
|
|
|
data-toggle="tooltip",
|
|
|
|
data-placement="bottom")
|
|
|
|
i.pi-notifications-none.nav-notifications-icon
|
|
|
|
span#notifications-count
|
|
|
|
span
|
|
|
|
.flyout-hat
|
|
|
|
|
|
|
|
#notifications.flyout.notifications
|
|
|
|
.flyout-content
|
|
|
|
span.flyout-title Notifications
|
|
|
|
a#notifications-markallread(
|
|
|
|
title="Mark All as Read",
|
|
|
|
href="/notifications/read-all")
|
|
|
|
| Mark All as Read
|
|
|
|
|
|
|
|
| {% include '_notifications.html' %}
|
|
|
|
|
|
|
|
| {% endif %}
|
|
|
|
| {% endmacro %}
|