Private
Public Access
1
0

strava list & compare

This commit is contained in:
Sander Roosendaal
2018-10-03 22:04:16 +02:00
parent b2c7f2ab30
commit c881dc98ec
5 changed files with 146 additions and 141 deletions

View File

@@ -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 %}