Direct users to renewal page on Store instead of /join
/join should only be used when someone can actually buy a new subscription. /renew should be used when someone already has a subscription that needs to be renewed. Since url_for('cloud.xxxx') makes no sense in Pillar, I just hard-coded /renew instead.
This commit is contained in:
parent
2bcc26860f
commit
9fdcfff4fc
@ -134,7 +134,7 @@ def comments_for_node(node_id):
|
||||
project = Project({'_id': node.project})
|
||||
can_post_comments = project.node_type_has_method('comment', 'POST', api=api)
|
||||
can_comment_override = request.args.get('can_comment', 'True') == 'True'
|
||||
can_post_comments = can_post_comments and can_comment_override
|
||||
can_post_comments = can_post_comments and can_comment_override and current_user.has_cap('subscriber')
|
||||
|
||||
# Query for all children, i.e. comments on the node.
|
||||
comments = Node.all({
|
||||
|
@ -40,6 +40,11 @@ li(class="dropdown")
|
||||
title="View subscription info")
|
||||
i.pi-heart-filled
|
||||
span You have a free account.
|
||||
| {% elif current_user.has_cap('can-renew-subscription') %}
|
||||
a.navbar-item(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/"
|
||||
|
@ -2,7 +2,7 @@ doctype
|
||||
html(lang="en")
|
||||
head
|
||||
meta(charset="utf-8")
|
||||
title Error
|
||||
title {% block title %}Error{% endblock %}
|
||||
meta(name="viewport", content="width=device-width, initial-scale=1.0")
|
||||
|
||||
link(href="{{ url_for('static_pillar', filename='assets/ico/favicon.png') }}", rel="shortcut icon")
|
||||
@ -10,7 +10,7 @@ html(lang="en")
|
||||
link(href="{{ url_for('static_pillar', filename='assets/css/font-pillar.css') }}", rel="stylesheet")
|
||||
link(href="{{ url_for('static_pillar', filename='assets/css/base.css') }}", rel="stylesheet")
|
||||
link(href='//fonts.googleapis.com/css?family=Roboto:300,400', rel='stylesheet', type='text/css')
|
||||
| {% block head %}{% endblock %}
|
||||
|
||||
body.error
|
||||
| {% block body %}{% endblock %}
|
||||
|
||||
|
@ -74,6 +74,15 @@
|
||||
| Download
|
||||
| {% endif %}
|
||||
|
||||
| {% elif current_user.has_cap('can-renew-subscription') %}
|
||||
li.download
|
||||
a.btn.btn-success(
|
||||
title="Renew your subscription to download",
|
||||
target="_blank",
|
||||
href="/renew")
|
||||
i.pi-heart
|
||||
| Renew subscription to download
|
||||
|
||||
| {% elif current_user.is_authenticated %}
|
||||
li.download
|
||||
a.btn(
|
||||
|
@ -27,9 +27,15 @@
|
||||
span
|
||||
small Support Blender and get awesome stuff!
|
||||
hr
|
||||
a.subscribe(href="{{ url_for('cloud.join') }}") <em>Subscribe</em>
|
||||
| {% if current_user.has_cap('can-renew-subscription') %}
|
||||
a.subscribe(href="/renew") You have a subscription, it just needs to be renewed. <em>Renew your subscription now!</em>
|
||||
| {% else %}
|
||||
a.subscribe(href="{{ url_for('cloud.join') }}") <em>Subscribe to Blender Cloud.</em>
|
||||
| {% endif %}
|
||||
| {% if current_user.is_anonymous %}
|
||||
a(href="{{ url_for('users.login') }}") Already a subscriber? Log in
|
||||
| {% endif %}
|
||||
| {% endif %}
|
||||
|
||||
|
||||
section.node-details-container.video
|
||||
|
@ -49,6 +49,9 @@
|
||||
| {% if current_user.has_cap('subscriber') %}
|
||||
i.pi-lock
|
||||
| Only project members can comment.
|
||||
| {% elif current_user.has_cap('can-renew-subscription') %}
|
||||
i.pi-heart
|
||||
a(href='/renew', target='_blank') Renew your subscription to join the conversation!
|
||||
| {% else %}
|
||||
| Join the conversation! <a href="https://store.blender.org/product/membership/">Subscribe to Blender Cloud</a> now.
|
||||
| {% endif %}
|
||||
|
@ -40,12 +40,17 @@ meta(name="twitter:image", content="{{ url_for('static', filename='assets/img/ba
|
||||
| {% endif %}
|
||||
|
||||
| {% if current_user.has_cap('subscriber') %}
|
||||
li.create(
|
||||
li.create#project-create(
|
||||
data-url="{{ url_for('projects.create') }}")
|
||||
a.btn.btn-success#project-create(
|
||||
a.btn.btn-success(
|
||||
href="{{ url_for('projects.create') }}")
|
||||
i.pi-plus
|
||||
| Create Project
|
||||
| {% elif current_user.has_cap('can-renew-subscription') %}
|
||||
li.create
|
||||
a.btn(href="/renew", target="_blank")
|
||||
i.pi-heart
|
||||
| Renew subscription to create a project
|
||||
| {% endif %}
|
||||
|
||||
nav.nav-tabs__tab.active#own_projects
|
||||
@ -83,6 +88,13 @@ meta(name="twitter:image", content="{{ url_for('static', filename='assets/img/ba
|
||||
.projects__list-details
|
||||
a.title(href="{{ url_for('projects.create') }}")
|
||||
| Create a project to get started!
|
||||
| {% elif current_user.has_cap('can-renew-subscription') %}
|
||||
li.projects__list-item(data-url="https://store.blender.org/renew-my-subscription.php")
|
||||
a.projects__list-thumbnail
|
||||
i.pi-plus
|
||||
.projects__list-details
|
||||
a.title(href="https://store.blender.org/renew-my-subscription.php")
|
||||
| Renew your Blender Cloud subscription to create your own projects!
|
||||
| {% else %}
|
||||
li.projects__list-item(data-url="/join")
|
||||
a.projects__list-thumbnail
|
||||
@ -222,7 +234,7 @@ script.
|
||||
});
|
||||
|
||||
// Create project
|
||||
$nav_tabs_list.find('li.create').on('click', function(e){
|
||||
$('#project-create').on('click', function(e){
|
||||
e.preventDefault();
|
||||
|
||||
$(this).addClass('disabled');
|
||||
|
Loading…
x
Reference in New Issue
Block a user