strava list & compare
This commit is contained in:
@@ -3,16 +3,16 @@
|
||||
<h1>Workouts</h1>
|
||||
<ul class="cd-accordion-menu animated">
|
||||
<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 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 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>
|
||||
<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>
|
||||
{% if user|is_promember %}
|
||||
@@ -28,12 +28,12 @@
|
||||
<label for="group-1"><i class="fas fa-cloud-download fa-fw"></i> Import</label>
|
||||
|
||||
<ul>
|
||||
<li id="concept2"><a href="#0">Concept2</a></li>
|
||||
<li id="strava"><a href="#0">Strava</a></li>
|
||||
<li id="runkeeper"><a href="#0">RunKeeper</a></li>
|
||||
<li id="sporttracks"><a href="#0">SportTracks</a></li>
|
||||
<li id="mapmyfitness"><a href="#0">MapMyFitness</a></li>
|
||||
<li id="polar"><a href="#0">Polar</a></li>
|
||||
<li id="concept2"><a href="/rowers/workout/c2import">Concept2</a></li>
|
||||
<li id="strava"><a href="/rowers/workout/stravaimport">Strava</a></li>
|
||||
<li id="runkeeper"><a href="/rowers/workout/runkeeperimport">RunKeeper</a></li>
|
||||
<li id="sporttracks"><a href="/rowers/workout/sporttracksimport">SportTracks</a></li>
|
||||
<li id="mapmyfitness"><a href="/rowers/workout/underarmourimport">MapMyFitness</a></li>
|
||||
<li id="polar"><a href="/rowers/workout/polarimport">Polar</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul> <!-- cd-accordion-menu -->
|
||||
|
||||
@@ -1,52 +1,59 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "newbase.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
|
||||
{% block title %}Workouts{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block main %}
|
||||
<h1>Available on Strava</h1>
|
||||
{% if workouts %}
|
||||
<div class="grid_2 alpha ">
|
||||
<a href="/rowers/workout/stravaimport/all/" class="button gray">Import all NEW</a>
|
||||
</div>
|
||||
<div class="grid_10 omega">
|
||||
<p>This imports all workouts that have not been imported to rowsandall.com.
|
||||
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>
|
||||
</div>
|
||||
<ul class="main-content">
|
||||
<li>
|
||||
<a href="/rowers/workout/stravaimport/all/" class="blue button">Import all NEW</a>
|
||||
</li>
|
||||
<li class="grid_3">
|
||||
<p>This imports all workouts that have not been imported to rowsandall.com.
|
||||
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>
|
||||
</li>
|
||||
|
||||
<div class="grid_12 alpha">
|
||||
<table width="70%" class="listtable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> Import </th>
|
||||
<th> Name</th>
|
||||
<th> Date</th>
|
||||
<th> Duration </th>
|
||||
<th> Distance </th>
|
||||
<th> Type</th>
|
||||
<th> New</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for workout in workouts %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/rowers/workout/stravaimport/{{ workout|lookup:'id' }}/">Import</a></td>
|
||||
<td>{{ workout|lookup:'name' }}</td>
|
||||
<td>{{ workout|lookup:'starttime' }}</td>
|
||||
<td>{{ workout|lookup:'duration' }} </td>
|
||||
<td>{{ workout|lookup:'distance' }} m</td>
|
||||
<td>{{ workout|lookup:'type' }}</td>
|
||||
<td>{{ workout|lookup:'new' }}</td>
|
||||
</tr>
|
||||
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<li class="grid_4">
|
||||
<table width="70%" class="listtable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> Import </th>
|
||||
<th> Name</th>
|
||||
<th> Date</th>
|
||||
<th> Duration </th>
|
||||
<th> Distance </th>
|
||||
<th> Type</th>
|
||||
<th> New</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for workout in workouts %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/rowers/workout/stravaimport/{{ workout|lookup:'id' }}/">Import</a></td>
|
||||
<td>{{ workout|lookup:'name' }}</td>
|
||||
<td>{{ workout|lookup:'starttime' }}</td>
|
||||
<td>{{ workout|lookup:'duration' }} </td>
|
||||
<td>{{ workout|lookup:'distance' }} m</td>
|
||||
<td>{{ workout|lookup:'type' }}</td>
|
||||
<td>{{ workout|lookup:'new' }}</td>
|
||||
</tr>
|
||||
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
{% else %}
|
||||
<p> No workouts found </p>
|
||||
{% endif %}
|
||||
<p>
|
||||
No workouts found
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% include 'menu_workouts.html' %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "newbase.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
|
||||
{% block title %}Workouts{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block main %}
|
||||
|
||||
<script>
|
||||
function toggle(source) {
|
||||
@@ -64,105 +64,101 @@
|
||||
|
||||
</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 %}
|
||||
<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>
|
||||
{{ dateform.as_table }}
|
||||
</table>
|
||||
{% else %}
|
||||
<form enctype="multipart/form-data" action="/rowers/team-compare-select/" method="post">
|
||||
{% endif %}
|
||||
<table>
|
||||
{{ dateform.as_table }}
|
||||
</table>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
{% csrf_token %}
|
||||
</div>
|
||||
<div class="grid_2 omega">
|
||||
<input name='daterange' class="button green" type="submit" value="Submit">
|
||||
</div>
|
||||
</form>
|
||||
{% 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">
|
||||
<input name='daterange' class="button green" type="submit" value="Submit">
|
||||
</p>
|
||||
</form>
|
||||
</li>
|
||||
<li>
|
||||
{% 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">
|
||||
<form enctype="multipart/form-data" action="/rowers/team-compare-select/team/{{ team.id }}/" method="post">
|
||||
{% 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 %}
|
||||
<div class="grid_3 prefix_1 alpha">
|
||||
<form enctype="multipart/form-data" action="/rowers/team-compare-select/" method="post">
|
||||
{% endif %}
|
||||
<table>
|
||||
{{ 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">
|
||||
</div>
|
||||
<div class="grid_1 omega">
|
||||
<button class="button blue small" type="submit">
|
||||
Search
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</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">
|
||||
</form>
|
||||
</li>
|
||||
<li>
|
||||
<p>Select two or more workouts on the left, set your plot settings below,
|
||||
and press submit</p>
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
{{ chartform.as_table }}
|
||||
</table>
|
||||
<div class="grid_1 prefix_2 suffix_1">
|
||||
and press submit</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>
|
||||
</div>
|
||||
<div class="grid_4">
|
||||
<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>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% 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'^400/$', TemplateView.as_view(template_name='400.html'),name='400'),
|
||||
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'^update_empower$',views.rower_update_empower_view),
|
||||
url(r'^agegroupcp/(?P<age>\d+)$',views.agegroupcpview),
|
||||
|
||||
@@ -5265,6 +5265,7 @@ def team_comparison_select(request,
|
||||
'enddate':enddate,
|
||||
'team':theteam,
|
||||
'form':form,
|
||||
'active':'nav-workouts',
|
||||
'chartform':chartform,
|
||||
'modalityform':modalityform,
|
||||
'teams':get_my_teams(request.user),
|
||||
@@ -9423,6 +9424,7 @@ def workout_stravaimport_view(request,message=""):
|
||||
|
||||
return render(request,'strava_list_import.html',
|
||||
{'workouts':workouts,
|
||||
'active':'nav-workouts',
|
||||
'teams':get_my_teams(request.user),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user