64 lines
1.8 KiB
Plaintext
64 lines
1.8 KiB
Plaintext
| {% extends 'menus/user_base.html' %}
|
|
|
|
| {% if current_user.has_role('demo') %}
|
|
| {% set subscription = 'demo' %}
|
|
| {% elif current_user.has_cap('subscriber') %}
|
|
| {% set subscription = 'subscriber' %}
|
|
| {% else %}
|
|
| {% set subscription = 'none' %}
|
|
| {% endif %}
|
|
|
|
| {% block menu_avatar %}
|
|
a.navbar-item.dropdown-toggle(href="{{ url_for('settings.profile') }}", data-toggle="dropdown")
|
|
current-user-avatar
|
|
.special(class="{{ subscription }}")
|
|
| {% if subscription == 'subscriber' %}
|
|
i.pi-check
|
|
| {% elif subscription == 'demo' %}
|
|
i.pi-heart-filled
|
|
| {% else %}
|
|
i.pi-attention
|
|
| {% endif %}
|
|
script.
|
|
new Vue({el: 'current-user-avatar'})
|
|
| {% endblock menu_avatar %}
|
|
|
|
|
|
| {% block menu_list %}
|
|
li.subscription-status(class="{{ subscription }}")
|
|
| {% if subscription == 'subscriber' %}
|
|
a.navbar-item.pt-2.pl-2.pr-3(
|
|
href="{{ url_for('settings.billing') }}"
|
|
title="View subscription info")
|
|
i.pi-grin
|
|
span.subitem Your subscription is active!
|
|
| {% elif subscription == 'demo' %}
|
|
a.navbar-item.pt-2.pl-2.pr-3(
|
|
href="{{url_for('settings.billing')}}"
|
|
title="View subscription info")
|
|
i.pi-heart-filled
|
|
span.subitem You have a free account.
|
|
| {% elif current_user.has_cap('can-renew-subscription') %}
|
|
a.navbar-item.pt-2.pl-2.pr-3(target='_blank', href="/renew", title="Renew subscription")
|
|
i.pi-heart
|
|
span.info Your subscription is not active.
|
|
span.renew Click here to renew.
|
|
| {% 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 %}
|
|
|
|
| {{ super() }}
|
|
|
|
li
|
|
a.navbar-item.px-2(
|
|
href="{{ url_for('settings.billing') }}"
|
|
title="Billing")
|
|
i.pi-credit-card
|
|
| Subscription
|
|
| {% endblock menu_list %}
|