Introducing settings blueprint
Now settings live in a dedicated space, the settings blueprint can be used by Pillar applications, and the templates can be extended or overridden. Moved subscription and email settings to the blender-cloud repository.
This commit is contained in:
@@ -4,17 +4,7 @@
|
||||
.settings-content
|
||||
ul
|
||||
a(class="{% if title == 'profile' %}active{% endif %}",
|
||||
href="{{ url_for('users.settings_profile') }}")
|
||||
href="{{ url_for('settings.profile') }}")
|
||||
li
|
||||
i.pi-vcard
|
||||
| Profile
|
||||
a(class="{% if title == 'emails' %}active{% endif %}",
|
||||
href="{{ url_for('users.settings_emails') }}")
|
||||
li
|
||||
i.pi-email
|
||||
| Emails
|
||||
a(class="{% if title == 'billing' %}active{% endif %}",
|
||||
href="{{ url_for('users.settings_billing') }}")
|
||||
li
|
||||
i.pi-credit-card
|
||||
| Subscription
|
||||
|
@@ -1,68 +0,0 @@
|
||||
| {% extends 'layout.html' %}
|
||||
| {% block head %}
|
||||
style(type='text/css').
|
||||
button#recheck_subscription {
|
||||
margin-top: 1em;
|
||||
}
|
||||
| {% endblock %}
|
||||
| {% block body %}
|
||||
.container
|
||||
#settings
|
||||
include _sidebar
|
||||
#settings-container
|
||||
.settings-header
|
||||
.settings-title Subscription
|
||||
|
||||
.settings-content
|
||||
|
||||
| {% if store_user['cloud_access'] %}
|
||||
h3.subscription-active
|
||||
i.pi-check
|
||||
| Your subscription is active
|
||||
h4 Thank you for supporting us!
|
||||
|
||||
hr
|
||||
|
||||
p Subscription expires on: <strong>{{ store_user['expiration_date'][:10] }}</strong>
|
||||
a(href="https://store.blender.org/my-account/subscriptions/") Manage your subscription on Blender Store
|
||||
| {% else %}
|
||||
|
||||
| {% if 'demo' in groups %}
|
||||
h3.subscription-demo
|
||||
i.pi-heart-filled
|
||||
| You have a free account
|
||||
|
||||
hr
|
||||
|
||||
p You have full access to the Blender Cloud, provided by the Blender Institute. This account is meant for free evaluation of the service. Get in touch with #[a(href="mailto:cloudsupport@blender.org") cloudsupport@blender.org] if you have any questions.
|
||||
|
||||
| {% else %}
|
||||
h3.subscription-missing
|
||||
i.pi-info
|
||||
| You do not have an active subscription.
|
||||
h3
|
||||
a(href="https://store.blender.org/product/membership/") Get full access to Blender Cloud now!
|
||||
| {% endif %}
|
||||
|
||||
| {% endif %}
|
||||
|
||||
p
|
||||
button#recheck_subscription.btn.btn-default(onclick="javascript:recheck_subscription(this)") Re-check my subscription
|
||||
hr
|
||||
|
||||
|
||||
script.
|
||||
function recheck_subscription(button) {
|
||||
$(button).text('Checking');
|
||||
|
||||
$.get('/api/bcloud/update-subscription')
|
||||
.done(function() {
|
||||
window.location.reload();
|
||||
})
|
||||
.fail(function() {
|
||||
alert('Unable to update subscription, please check your internet connection.');
|
||||
})
|
||||
;
|
||||
}
|
||||
|
||||
| {% endblock %}
|
@@ -1,27 +0,0 @@
|
||||
| {% extends 'layout.html' %}
|
||||
| {% block body %}
|
||||
.container
|
||||
#settings
|
||||
include _sidebar
|
||||
#settings-container
|
||||
.settings-header
|
||||
.settings-title Emails
|
||||
|
||||
.settings-content
|
||||
|
||||
.settings-form
|
||||
form#settings-form(method='POST', action="{{url_for('users.settings_emails')}}")
|
||||
| {{ form.csrf_token }}
|
||||
| {% for subfield in form.email_communications %}
|
||||
.form-group.
|
||||
{{ subfield }}
|
||||
{{ subfield.label }}
|
||||
| {% endfor %}
|
||||
|
||||
.buttons
|
||||
button.btn.btn-default.button-submit(type='submit')
|
||||
i.pi-check
|
||||
| Save Changes
|
||||
|
||||
|
||||
| {% endblock %}
|
@@ -2,14 +2,14 @@
|
||||
| {% block body %}
|
||||
.container
|
||||
#settings
|
||||
include _sidebar
|
||||
| {% include 'users/settings/_sidebar.html'%}
|
||||
#settings-container
|
||||
.settings-header
|
||||
.settings-title Profile
|
||||
|
||||
.settings-content
|
||||
.settings-form
|
||||
form#settings-form(method='POST', action="{{url_for('users.settings_profile')}}")
|
||||
form#settings-form(method='POST', action="{{url_for('settings.profile')}}")
|
||||
.left
|
||||
.form-group
|
||||
| {{ form.full_name.label }}
|
||||
|
Reference in New Issue
Block a user