free coach implementation
This commit is contained in:
@@ -6,8 +6,36 @@
|
||||
|
||||
{% endblock %}
|
||||
{% block main %}
|
||||
<h1>New Coach Registration (free Coach Plan)</h1>
|
||||
<ul class="main-content">
|
||||
<li class="grid_4">
|
||||
<h1>New Coach Registration (free Coach Plan)</h1>
|
||||
</li>
|
||||
<li class="rounder grid_2">
|
||||
<a href="/rowers/coachregister">
|
||||
<h1>Register as a coach (free)</h1>
|
||||
<p>Click here and fill out the form to start with a free Coach plan. This allows you
|
||||
to manage up to 10 athletes (who have to be on the Pro plan). You cannot upload your own
|
||||
workouts.
|
||||
</p>
|
||||
<p>
|
||||
From this free plan, you can upgrade to any of the paid plans, including coach plans for larger
|
||||
athlete groups or rower plans for managing your own training plan and workouts.
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="rounder grid_2">
|
||||
<a href="/rowers/register">
|
||||
<h1>Register as an athlete (free)</h1>
|
||||
<p>Click here and fill out the form to start with a free Athlete plan. This allows you
|
||||
to store and analyze your own workouts.
|
||||
</p>
|
||||
<p>
|
||||
From this free plan, you can upgrade to any of the paid plans, including
|
||||
coach plans for managing larger athlete groups or rower plans for expanded
|
||||
analytics.
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
<div id="registrationform">
|
||||
|
||||
|
||||
@@ -6,8 +6,36 @@
|
||||
|
||||
{% endblock %}
|
||||
{% block main %}
|
||||
<h1>New User Registration</h1>
|
||||
<ul class="main-content">
|
||||
<li class="grid_4">
|
||||
<h1>New User Registration</h1>
|
||||
</li>
|
||||
<li class="rounder grid_2">
|
||||
<a href="/rowers/coachregister">
|
||||
<h1>Register as a coach (free)</h1>
|
||||
<p>Click here and fill out the form to start with a free Coach plan. This allows you
|
||||
to manage up to 10 athletes (who have to be on the Pro plan). You cannot upload your own
|
||||
workouts.
|
||||
</p>
|
||||
<p>
|
||||
From this free plan, you can upgrade to any of the paid plans, including coach plans for larger
|
||||
athlete groups or rower plans for managing your own training plan and workouts.
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="rounder grid_2">
|
||||
<a href="/rowers/register">
|
||||
<h1>Register as an athlete (free)</h1>
|
||||
<p>Click here and fill out the form to start with a free Athlete plan. This allows you
|
||||
to store and analyze your own workouts.
|
||||
</p>
|
||||
<p>
|
||||
From this free plan, you can upgrade to any of the paid plans, including
|
||||
coach plans for managing larger athlete groups or rower plans for expanded
|
||||
analytics.
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
<div id="registrationform">
|
||||
|
||||
|
||||
@@ -331,7 +331,7 @@ def is_promember(user):
|
||||
@register.filter
|
||||
def is_manager(user):
|
||||
r = Rower.objects.get(user=user)
|
||||
return r.rowerplan == 'coach'
|
||||
return 'coach' in r.rowerplan
|
||||
|
||||
from rowers.views import hasplannedsessions
|
||||
@register.filter
|
||||
|
||||
@@ -1009,7 +1009,7 @@ def iscoachmember(user):
|
||||
r = Rower(user=user)
|
||||
r.save()
|
||||
|
||||
result = user.is_authenticated and (r.rowerplan=='coach')
|
||||
result = user.is_authenticated and ('coach' in r.rowerplan)
|
||||
else:
|
||||
result = False
|
||||
|
||||
@@ -1025,7 +1025,7 @@ def cancreateteam(user):
|
||||
r = Rower(user=user)
|
||||
r.save()
|
||||
|
||||
if user.is_authenticated and (r.rowerplan=='coach'):
|
||||
if user.is_authenticated and ('coach' in r.rowerplan):
|
||||
return True
|
||||
elif user.is_athenticated() and r.rowerplan in ['plan','pro']:
|
||||
ts = Team.objects.filter(manager=user)
|
||||
|
||||
@@ -3842,6 +3842,9 @@ def workout_upload_view(request,
|
||||
is_ajax = True
|
||||
|
||||
r = getrower(request.user)
|
||||
if r.rowerplan == 'freecoach':
|
||||
url = reverse('team_workout_upload_view')
|
||||
return HttpResponseRedirect(url)
|
||||
|
||||
breadcrumbs = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user