Private
Public Access
1
0

Merge branch 'feature/nextprev' into develop

This commit is contained in:
Sander Roosendaal
2018-11-27 14:15:20 +01:00
9 changed files with 59 additions and 3 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ class RowerInline(admin.StackedInline):
fieldsets = ( fieldsets = (
('Rower Plan', ('Rower Plan',
{'fields':('rowerplan','planexpires','teamplanexpires','clubsize','protrialexpires','plantrialexpires',)}), {'fields':('rowerplan','paymenttype','planexpires','teamplanexpires','clubsize','protrialexpires','plantrialexpires',)}),
('Rower Settings', ('Rower Settings',
{'fields': {'fields':
('gdproptin','gdproptindate','weightcategory','sex','birthdate','getemailnotifications', ('gdproptin','gdproptindate','weightcategory','sex','birthdate','getemailnotifications',
+1
View File
@@ -704,6 +704,7 @@ class Rower(models.Model):
choices=plans) choices=plans)
paymenttype = models.CharField( paymenttype = models.CharField(
default='single',max_length=30, default='single',max_length=30,
verbose_name='Payment Type',
choices=( choices=(
('single','single'), ('single','single'),
('recurring','recurring') ('recurring','recurring')
+1 -1
View File
@@ -299,7 +299,7 @@ def get_polar_workout(user,id,transactionid):
if response.status_code == 200: if response.status_code == 200:
exerciseurls = response.json()['exercises'] exerciseurls = response.json()['exercises']
for exerciseurl in exerciseurls: for exerciseurl in exerciseurls:
response = requests.gedt(exerciseurl,headers=headers) response = requests.get(exerciseurl,headers=headers)
if response.status_code == 200: if response.status_code == 200:
exercise_dict = response.json() exercise_dict = response.json()
thisid = exercise_dict['id'] thisid = exercise_dict['id']
+11
View File
@@ -19,6 +19,17 @@
{{ the_script |safe }} {{ the_script |safe }}
<p>
{% if workout|previousworkout:rower.user %}
<a href="/rowers/workout/{{ workout|previousworkout:rower.user }}/flexchart"
title="Jump to preceding workout"><em>Previous</em></a>&nbsp;
{% endif %}
{% if workout|nextworkout:rower.user %}
<a href="/rowers/workout/{{ workout|nextworkout:rower.user }}/flexchart"
title="Jump to following workout"><em>Next</em></a>
{% endif %}
</p>
<h1>Flexible Chart</h1> <h1>Flexible Chart</h1>
+11
View File
@@ -6,6 +6,17 @@
{% block title %}Change Workout {% endblock %} {% block title %}Change Workout {% endblock %}
{% block main %} {% block main %}
<p>
{% if workout|previousworkout:rower.user %}
<a href="/rowers/workout/{{ workout|previousworkout:rower.user }}/editintervals"
title="Jump to preceding workout"><em>Previous</em></a>&nbsp;
{% endif %}
{% if workout|nextworkout:rower.user %}
<a href="/rowers/workout/{{ workout|nextworkout:rower.user }}/editintervals"
title="Jump to following workout"><em>Next</em></a>
{% endif %}
</p>
<h1>Edit Workout Interval Data</h1> <h1>Edit Workout Interval Data</h1>
<ul class="main-content"> <ul class="main-content">
<li class="grid_2"> <li class="grid_2">
+11
View File
@@ -60,6 +60,17 @@
{% block main %} {% block main %}
<p>
{% if workout|previousworkout:rower.user %}
<a href="/rowers/workout/{{ workout|previousworkout:rower.user }}/workflow"
title="Jump to preceding workout"><em>Previous</em></a>&nbsp;
{% endif %}
{% if workout|nextworkout:rower.user %}
<a href="/rowers/workout/{{ workout|nextworkout:rower.user }}/workflow"
title="Jump to following workout"><em>Next</em></a>
{% endif %}
</p>
<h1>{{ workout.name }}</h1> <h1>{{ workout.name }}</h1>
{% if workout.user.user != user %} {% if workout.user.user != user %}
<h2>{{ workout.user.user.first_name }} {{ workout.user.user.last_name }}</h2> <h2>{{ workout.user.user.first_name }} {{ workout.user.user.last_name }}</h2>
+11
View File
@@ -10,6 +10,17 @@
{% block title %}Comment Workout {% endblock %} {% block title %}Comment Workout {% endblock %}
{% block main %} {% block main %}
<p>
{% if workout|previousworkout:rower.user %}
<a href="/rowers/workout/{{ workout|previousworkout:rower.user }}/comment"
title="Jump to preceding workout"><em>Previous</em></a>&nbsp;
{% endif %}
{% if workout|nextworkout:rower.user %}
<a href="/rowers/workout/{{ workout|nextworkout:rower.user }}/comment"
title="Jump to following workout"><em>Next</em></a>
{% endif %}
</p>
<h1>Comments {{ workout.name }}</h1> <h1>Comments {{ workout.name }}</h1>
<ul class="main-content"> <ul class="main-content">
+11
View File
@@ -5,6 +5,17 @@
{% block title %}Workout Statistics{% endblock %} {% block title %}Workout Statistics{% endblock %}
{% block main %} {% block main %}
<p>
{% if workout|previousworkout:rower.user %}
<a href="/rowers/workout/{{ workout|previousworkout:rower.user }}/stats"
title="Jump to preceding workout"><em>Previous</em></a>&nbsp;
{% endif %}
{% if workout|nextworkout:rower.user %}
<a href="/rowers/workout/{{ workout|nextworkout:rower.user }}/stats"
title="Jump to following workout"><em>Next</em></a>
{% endif %}
</p>
<h1>Workout Statistics for {{ workout.name }}</h1> <h1>Workout Statistics for {{ workout.name }}</h1>
<ul class="main-content"> <ul class="main-content">
<li class="grid_4"> <li class="grid_4">
+1 -1
View File
@@ -165,7 +165,7 @@
</li> </li>
{% if user.is_authenticated %} {% if user.is_authenticated %}
<li> <li>
<a href="/rowers/me/edit" title="Profile"> <a href="/rowers/me/preferences" title="Profile">
{% if user.rower.rowerplan == 'pro' %} {% if user.rower.rowerplan == 'pro' %}
<i class="fas fa-user-ninja "></i> <i class="fas fa-user-ninja "></i>
{% elif user.rower.rowerplan == 'coach' %} {% elif user.rower.rowerplan == 'coach' %}