strava list & compare
This commit is contained in:
@@ -3,16 +3,16 @@
|
|||||||
<h1>Workouts</h1>
|
<h1>Workouts</h1>
|
||||||
<ul class="cd-accordion-menu animated">
|
<ul class="cd-accordion-menu animated">
|
||||||
<li id="workouts-list">
|
<li id="workouts-list">
|
||||||
<a href="#0"><i class="fas fa-clipboard-list fa-fw"></i> Workouts List</a>
|
<a href="/rower/list-workouts"><i class="fas fa-clipboard-list fa-fw"></i> Workouts List</a>
|
||||||
</li>
|
</li>
|
||||||
<li id="charts">
|
<li id="charts">
|
||||||
<a href="#0"><i class="fas fa-chart-pie fa-fw"></i> Charts</a>
|
<a href="/rowers/list-graphs"><i class="fas fa-chart-pie fa-fw"></i> Charts</a>
|
||||||
</li>
|
</li>
|
||||||
<li id="compare">
|
<li id="compare">
|
||||||
<a href="#0"><i class="fas fa-balance-scale fa-fw"></i> Compare</a>
|
<a href="/rowers/team-compare-select/team/0/"><i class="fas fa-balance-scale fa-fw"></i> Compare</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#0"><i class="fas fa-file-upload fa-fw"></i> Upload</a>
|
<a href="/rowers/workout/upload/"><i class="fas fa-file-upload fa-fw"></i> Upload</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
{% if user|is_promember %}
|
{% if user|is_promember %}
|
||||||
@@ -28,12 +28,12 @@
|
|||||||
<label for="group-1"><i class="fas fa-cloud-download fa-fw"></i> Import</label>
|
<label for="group-1"><i class="fas fa-cloud-download fa-fw"></i> Import</label>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li id="concept2"><a href="#0">Concept2</a></li>
|
<li id="concept2"><a href="/rowers/workout/c2import">Concept2</a></li>
|
||||||
<li id="strava"><a href="#0">Strava</a></li>
|
<li id="strava"><a href="/rowers/workout/stravaimport">Strava</a></li>
|
||||||
<li id="runkeeper"><a href="#0">RunKeeper</a></li>
|
<li id="runkeeper"><a href="/rowers/workout/runkeeperimport">RunKeeper</a></li>
|
||||||
<li id="sporttracks"><a href="#0">SportTracks</a></li>
|
<li id="sporttracks"><a href="/rowers/workout/sporttracksimport">SportTracks</a></li>
|
||||||
<li id="mapmyfitness"><a href="#0">MapMyFitness</a></li>
|
<li id="mapmyfitness"><a href="/rowers/workout/underarmourimport">MapMyFitness</a></li>
|
||||||
<li id="polar"><a href="#0">Polar</a></li>
|
<li id="polar"><a href="/rowers/workout/polarimport">Polar</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul> <!-- cd-accordion-menu -->
|
</ul> <!-- cd-accordion-menu -->
|
||||||
|
|||||||
@@ -1,52 +1,59 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "newbase.html" %}
|
||||||
{% load staticfiles %}
|
{% load staticfiles %}
|
||||||
{% load rowerfilters %}
|
{% load rowerfilters %}
|
||||||
|
|
||||||
{% block title %}Workouts{% endblock %}
|
{% block title %}Workouts{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block main %}
|
||||||
<h1>Available on Strava</h1>
|
<h1>Available on Strava</h1>
|
||||||
{% if workouts %}
|
{% if workouts %}
|
||||||
<div class="grid_2 alpha ">
|
<ul class="main-content">
|
||||||
<a href="/rowers/workout/stravaimport/all/" class="button gray">Import all NEW</a>
|
<li>
|
||||||
</div>
|
<a href="/rowers/workout/stravaimport/all/" class="blue button">Import all NEW</a>
|
||||||
<div class="grid_10 omega">
|
</li>
|
||||||
<p>This imports all workouts that have not been imported to rowsandall.com.
|
<li class="grid_3">
|
||||||
The action may take a longer time to process, so please be patient. Click on Import in the list below to import an individual workout.
|
<p>This imports all workouts that have not been imported to rowsandall.com.
|
||||||
</p>
|
The action may take a longer time to process, so please be patient. Click on Import in the list below to import an individual workout.
|
||||||
</div>
|
</p>
|
||||||
|
</li>
|
||||||
|
|
||||||
<div class="grid_12 alpha">
|
<li class="grid_4">
|
||||||
<table width="70%" class="listtable">
|
<table width="70%" class="listtable">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th> Import </th>
|
<th> Import </th>
|
||||||
<th> Name</th>
|
<th> Name</th>
|
||||||
<th> Date</th>
|
<th> Date</th>
|
||||||
<th> Duration </th>
|
<th> Duration </th>
|
||||||
<th> Distance </th>
|
<th> Distance </th>
|
||||||
<th> Type</th>
|
<th> Type</th>
|
||||||
<th> New</th>
|
<th> New</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for workout in workouts %}
|
{% for workout in workouts %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="/rowers/workout/stravaimport/{{ workout|lookup:'id' }}/">Import</a></td>
|
<a href="/rowers/workout/stravaimport/{{ workout|lookup:'id' }}/">Import</a></td>
|
||||||
<td>{{ workout|lookup:'name' }}</td>
|
<td>{{ workout|lookup:'name' }}</td>
|
||||||
<td>{{ workout|lookup:'starttime' }}</td>
|
<td>{{ workout|lookup:'starttime' }}</td>
|
||||||
<td>{{ workout|lookup:'duration' }} </td>
|
<td>{{ workout|lookup:'duration' }} </td>
|
||||||
<td>{{ workout|lookup:'distance' }} m</td>
|
<td>{{ workout|lookup:'distance' }} m</td>
|
||||||
<td>{{ workout|lookup:'type' }}</td>
|
<td>{{ workout|lookup:'type' }}</td>
|
||||||
<td>{{ workout|lookup:'new' }}</td>
|
<td>{{ workout|lookup:'new' }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p> No workouts found </p>
|
<p>
|
||||||
{% endif %}
|
No workouts found
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block sidebar %}
|
||||||
|
{% include 'menu_workouts.html' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "newbase.html" %}
|
||||||
{% load staticfiles %}
|
{% load staticfiles %}
|
||||||
{% load rowerfilters %}
|
{% load rowerfilters %}
|
||||||
|
|
||||||
{% block title %}Workouts{% endblock %}
|
{% block title %}Workouts{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block main %}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function toggle(source) {
|
function toggle(source) {
|
||||||
@@ -64,105 +64,101 @@
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<h1>{{ team.name }} Compare Workouts</h1>
|
||||||
|
|
||||||
<div class="grid_12 alpha">
|
|
||||||
{% include "teambuttons.html" with teamid=team.id team=team %}
|
|
||||||
</div>
|
|
||||||
<div class="grid_12 alpha">
|
|
||||||
<h3>{{ team.name }} Team Workouts</h3>
|
|
||||||
</div>
|
|
||||||
<div class="grid_12 alpha">
|
|
||||||
<div class="grid_6 alpha">
|
|
||||||
|
|
||||||
|
<ul class="main-content">
|
||||||
|
<li class="grid_2 maxheight">
|
||||||
|
<form enctype="multipart/form-data" action="/rowers/multi-compare" method="post">
|
||||||
|
{% if workouts %}
|
||||||
|
|
||||||
|
<input type="checkbox" onClick="toggle(this)" /> Toggle All<br/>
|
||||||
|
|
||||||
|
<table width="100%" class="listtable">
|
||||||
|
{{ form.as_table }}
|
||||||
|
</table>
|
||||||
|
|
||||||
|
{% else %}
|
||||||
|
<p> No workouts found </p>
|
||||||
|
{% endif %}
|
||||||
|
</li>
|
||||||
|
<li class="grid_2">
|
||||||
|
<p>
|
||||||
|
{% csrf_token %}
|
||||||
|
<table>
|
||||||
|
{{ chartform.as_table }}
|
||||||
|
</table>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<input name='workoutselectform' class="button green" type="submit" value="Submit">
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
{% if team %}
|
{% if team %}
|
||||||
<form enctype="multipart/form-data" action="/rowers/team-compare-select/team/{{ team.id }}/" method="post">
|
<form enctype="multipart/form-data" action="/rowers/team-compare-select/team/{{ team.id }}/" method="post">
|
||||||
{% else %}
|
{% else %}
|
||||||
<form enctype="multipart/form-data" action="/rowers/team-compare-select/" method="post">
|
<form enctype="multipart/form-data" action="/rowers/team-compare-select/" method="post">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="grid_4 alpha">
|
<table>
|
||||||
<table>
|
{{ dateform.as_table }}
|
||||||
{{ dateform.as_table }}
|
</table>
|
||||||
</table>
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
</div>
|
<input name='daterange' class="button green" type="submit" value="Submit">
|
||||||
<div class="grid_2 omega">
|
</p>
|
||||||
<input name='daterange' class="button green" type="submit" value="Submit">
|
</form>
|
||||||
</div>
|
</li>
|
||||||
</form>
|
<li>
|
||||||
{% if team %}
|
|
||||||
<form enctype="multipart/form-data" action="/rowers/team-compare-select/team/{{ team.id }}/" method="post">
|
|
||||||
{% else %}
|
|
||||||
<form enctype="multipart/form-data" action="/rowers/team-compare-select/" method="post">
|
|
||||||
{% endif %}
|
|
||||||
<div class="grid_4 alpha">
|
|
||||||
<table>
|
|
||||||
{{ modalityform.as_table }}
|
|
||||||
</table>
|
|
||||||
{% csrf_token %}
|
|
||||||
</div>
|
|
||||||
<div class="grid_2 omega">
|
|
||||||
<input name='modalityform' class="button green" type="submit" value="Submit">
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<div class="grid_5 prefix_1 omega">
|
|
||||||
{% if team %}
|
{% if team %}
|
||||||
<form id="searchform" action="/rowers/team-compare-select/team/{{ team.id }}/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
|
<form enctype="multipart/form-data" action="/rowers/team-compare-select/team/{{ team.id }}/" method="post">
|
||||||
method="get" accept-charset="utf-8">
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<form id="searchform" action="/rowers/team-compare-select/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
|
<form enctype="multipart/form-data" action="/rowers/team-compare-select/" method="post">
|
||||||
method="get" accept-charset="utf-8">
|
{% endif %}
|
||||||
{% endif %}
|
<table>
|
||||||
<div class="grid_3 prefix_1 alpha">
|
{{ modalityform.as_table }}
|
||||||
|
</table>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
{% csrf_token %}
|
||||||
|
<p>
|
||||||
|
<input name='modalityform' class="button green" type="submit" value="Submit">
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
|
<li class="grid_2">
|
||||||
|
{% if team %}
|
||||||
|
<form id="searchform" action="/rowers/team-compare-select/team/{{ team.id }}/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
|
||||||
|
method="get" accept-charset="utf-8">
|
||||||
|
{% else %}
|
||||||
|
<form id="searchform" action="/rowers/team-compare-select/{{ startdate|date:"Y-m-d" }}/{{ enddate|date:"Y-m-d" }}"
|
||||||
|
method="get" accept-charset="utf-8">
|
||||||
|
{% endif %}
|
||||||
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
|
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
|
||||||
</div>
|
|
||||||
<div class="grid_1 omega">
|
|
||||||
<button class="button blue small" type="submit">
|
<button class="button blue small" type="submit">
|
||||||
Search
|
Search
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</form>
|
||||||
</form>
|
</li>
|
||||||
</div>
|
<li>
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<form enctype="multipart/form-data" action="/rowers/multi-compare" method="post">
|
|
||||||
<div id="workouts_table" class="grid_8 alpha">
|
|
||||||
|
|
||||||
|
|
||||||
{% if workouts %}
|
|
||||||
|
|
||||||
<input type="checkbox" onClick="toggle(this)" /> Toggle All<br/>
|
|
||||||
|
|
||||||
<table width="100%" class="listtable">
|
|
||||||
{{ form.as_table }}
|
|
||||||
</table>
|
|
||||||
|
|
||||||
{% else %}
|
|
||||||
<p> No workouts found </p>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
<div id="form_settings" class="grid_4 alpha">
|
|
||||||
<p>Select two or more workouts on the left, set your plot settings below,
|
<p>Select two or more workouts on the left, set your plot settings below,
|
||||||
and press submit</p>
|
and press submit</p>
|
||||||
{% csrf_token %}
|
|
||||||
<table>
|
|
||||||
{{ chartform.as_table }}
|
|
||||||
</table>
|
|
||||||
<div class="grid_1 prefix_2 suffix_1">
|
|
||||||
<p>
|
<p>
|
||||||
<input name='workoutselectform' class="button green" type="submit" value="Submit">
|
You can use the date and search forms above to search through all
|
||||||
|
workouts from this team.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
TIP: Agree with your team members to put tags (e.g. '8x500m')
|
||||||
|
in the notes section of
|
||||||
|
your workouts. That makes it easy to search.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</li>
|
||||||
<div class="grid_4">
|
</ul>
|
||||||
<p>You can use the date and search forms above to search through all
|
|
||||||
workouts from this team.</p>
|
|
||||||
<p>TIP: Agree with your team members to put tags (e.g. '8x500m') in the notes section of
|
|
||||||
your workouts. That makes it easy to search.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block sidebar %}
|
||||||
|
{% include 'menu_workouts.html' %}
|
||||||
|
{% endblock %}
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ urlpatterns = [
|
|||||||
url(r'^404/$', TemplateView.as_view(template_name='404.html'),name='404'),
|
url(r'^404/$', TemplateView.as_view(template_name='404.html'),name='404'),
|
||||||
url(r'^400/$', TemplateView.as_view(template_name='400.html'),name='400'),
|
url(r'^400/$', TemplateView.as_view(template_name='400.html'),name='400'),
|
||||||
url(r'^403/$', TemplateView.as_view(template_name='403.html'),name='403'),
|
url(r'^403/$', TemplateView.as_view(template_name='403.html'),name='403'),
|
||||||
# url(r'^imports/$', views.imports_view),
|
url(r'^imports/$', views.imports_view),
|
||||||
url(r'^exportallworkouts/?$',views.workouts_summaries_email_view),
|
url(r'^exportallworkouts/?$',views.workouts_summaries_email_view),
|
||||||
url(r'^update_empower$',views.rower_update_empower_view),
|
url(r'^update_empower$',views.rower_update_empower_view),
|
||||||
url(r'^agegroupcp/(?P<age>\d+)$',views.agegroupcpview),
|
url(r'^agegroupcp/(?P<age>\d+)$',views.agegroupcpview),
|
||||||
|
|||||||
@@ -5265,6 +5265,7 @@ def team_comparison_select(request,
|
|||||||
'enddate':enddate,
|
'enddate':enddate,
|
||||||
'team':theteam,
|
'team':theteam,
|
||||||
'form':form,
|
'form':form,
|
||||||
|
'active':'nav-workouts',
|
||||||
'chartform':chartform,
|
'chartform':chartform,
|
||||||
'modalityform':modalityform,
|
'modalityform':modalityform,
|
||||||
'teams':get_my_teams(request.user),
|
'teams':get_my_teams(request.user),
|
||||||
@@ -9423,6 +9424,7 @@ def workout_stravaimport_view(request,message=""):
|
|||||||
|
|
||||||
return render(request,'strava_list_import.html',
|
return render(request,'strava_list_import.html',
|
||||||
{'workouts':workouts,
|
{'workouts':workouts,
|
||||||
|
'active':'nav-workouts',
|
||||||
'teams':get_my_teams(request.user),
|
'teams':get_my_teams(request.user),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user