Private
Public Access
1
0

Initial version of workout choice field

This commit is contained in:
Sander Roosendaal
2017-02-18 09:50:09 +01:00
parent a36b2f1693
commit 33afb8800b
5 changed files with 211 additions and 9 deletions

View File

@@ -0,0 +1,95 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}Workouts{% endblock %}
{% block content %}
<script>
setTimeout("location.reload(true);",60000);
</script>
<div class="grid_12">
Select start and end date for a date range:
<div class="grid_4 alpha">
{% 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 %}
<table>
{{ dateform.as_table }}
</table>
{% csrf_token %}
</div>
<div class="grid_2">
<input name='daterange' class="button green" type="submit" value="Submit"> </form>
</div>
<div class="grid_5 prefix_1 omega">
{% 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 %}
<div class="grid_3 prefix_1 alpha">
<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>
<div id="workouts_table" class="grid_8 alpha">
{% if team %}
<h3>{{ team.name }} Team Workouts</h3>
{% else %}
<h3>Team Workouts</h3>
{% endif %}
{% if workouts %}
<table width="100%" class="listtable">
{{ form.as_table }}
</table>
{% else %}
<p> No workouts found </p>
{% endif %}
</div>
<div class="grid_2 prefix_1 omega">
<span class="button gray small">
{% if workouts.has_previous %}
{% if request.GET.q %}
<a class="wh" href="?page={{ workouts.previous_page_number }}&q={{ request.GET.q }}">&lt;</a>
{% else %}
<a class="wh" href="?page={{ workouts.previous_page_number }}">&lt;</a>
{% endif %}
{% endif %}
<span>
Page {{ workouts.number }} of {{ workouts.paginator.num_pages }}.
</span>
{% if workouts.has_next %}
{% if request.GET.q %}
<a class="wh" href="?page={{ workouts.next_page_number }}&q={{ request.GET.q }}">&gt;</a>
{% else %}
<a class="wh" href="?page={{ workouts.next_page_number }}">&gt;</a>
{% endif %}
{% endif %}
</span>
{% endblock %}