adding previous and next to new workout pages
This commit is contained in:
@@ -299,7 +299,7 @@ def get_polar_workout(user,id,transactionid):
|
||||
if response.status_code == 200:
|
||||
exerciseurls = response.json()['exercises']
|
||||
for exerciseurl in exerciseurls:
|
||||
response = requests.gedt(exerciseurl,headers=headers)
|
||||
response = requests.get(exerciseurl,headers=headers)
|
||||
if response.status_code == 200:
|
||||
exercise_dict = response.json()
|
||||
thisid = exercise_dict['id']
|
||||
|
||||
@@ -19,6 +19,17 @@
|
||||
|
||||
{{ 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>
|
||||
{% 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>
|
||||
|
||||
|
||||
@@ -6,6 +6,17 @@
|
||||
{% block title %}Change Workout {% endblock %}
|
||||
|
||||
{% 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>
|
||||
{% 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>
|
||||
<ul class="main-content">
|
||||
<li class="grid_2">
|
||||
|
||||
@@ -60,6 +60,17 @@
|
||||
|
||||
|
||||
{% 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>
|
||||
{% 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>
|
||||
{% if workout.user.user != user %}
|
||||
<h2>{{ workout.user.user.first_name }} {{ workout.user.user.last_name }}</h2>
|
||||
|
||||
@@ -10,6 +10,17 @@
|
||||
{% block title %}Comment Workout {% endblock %}
|
||||
|
||||
{% 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>
|
||||
{% 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>
|
||||
|
||||
<ul class="main-content">
|
||||
|
||||
@@ -5,6 +5,17 @@
|
||||
{% block title %}Workout Statistics{% endblock %}
|
||||
|
||||
{% 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>
|
||||
{% 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>
|
||||
<ul class="main-content">
|
||||
<li class="grid_4">
|
||||
|
||||
Reference in New Issue
Block a user