Private
Public Access
1
0

initial incomplete version

This commit is contained in:
Sander Roosendaal
2018-11-27 17:49:02 +01:00
parent f403d1bf16
commit 8162b2fc45
10 changed files with 815 additions and 52 deletions

View File

@@ -0,0 +1,61 @@
{% extends "newbase.html" %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}New Virtual Race{% endblock %}
{% block main %}
<h1>New Indoor Virtual Race</h1>
<ul class="main-content">
<li class="grid_4">
<p>With this form, you can create a new virtual race. After you submit
the form, the race is created and will be visible to all users. From
that moment, only the site admin can delete the race
(admin@rowsandall.com). You can still edit the race until
the start of the race window.
</p>
</li>
<li class="grid_3">
<form enctype="multipart/form-data" action="{{ formloc }}" method="post">
{% if form.errors %}
<p style="color: red;">
Please correct the error{{ form.errors|pluralize }} below.
</p>
{% endif %}
<p>
<table>
{{ form.as_table }}
</table>
</p>
<p>
{% csrf_token %}
<input type="submit" value="Save">
</p>
</form>
</li>
<li class="grid_1">
<p>
<ul>
<li>All times are local times in the time zone you select</li>
<li>Adding a contact phone number and email is not mandatory, but we
strongly recommend it.</li>
<li>If your event has a registration closure deadline, participants
have to enter (and can withdraw) before the registration closure time.</li>
<li>Participants can submit results until the evaluation closure time.</li>
</ul>
</p>
</li>
</ul>
{% endblock %}
{% block scripts %}
{% endblock %}
{% block sidebar %}
{% include 'menu_racing.html' %}
{% endblock %}

View File

@@ -10,6 +10,11 @@
<i class="far fa-flag fa-fw"></i>&nbsp;New Race
</a>
</li>
<li id="indoor-new">
<a href="/rowers/virtualevent/createindoor">
<i class="far fa-flag fa-fw"></i>&nbsp;New Indoor Race
</a>
</li>
<li id="courses">
<a href="/rowers/list-courses">
<i class="fas fa-map-marked fa-fw"></i>&nbsp;Courses

View File

@@ -8,7 +8,8 @@
<th>Event</th>
<th>Country</th>
<th>Course</th>
<th>Distance</th>
<th></th>
<th></th>
<th>Click for Details</th>
</tr>
</thead>
@@ -26,7 +27,8 @@
<td><a href="/rowers/virtualevent/{{ race.id }}">{{ race.name }}</a></td>
<td>{{ race.course.country }}</td>
<td><a href="/rowers/courses/{{ race.course.id }}">{{ race.course.name }}</a></td>
<td>{{ race.sessionvalue }} m</td>
<td>{{ race.sessionvalue }}</td>
<td>{{ race.sessionunit }}</td>
<td>
{% if rower %}
{% if race|can_register:rower %}

View File

@@ -14,6 +14,7 @@
<h1>{{ race.name }}</h1>
<ul class="main-content">
{% if race.sessiontype == 'race' %}
<li class="grid_2">
<p>
<h2>Course</h2>
@@ -24,6 +25,7 @@
{{ coursescript|safe }}
</div>
</li>
{% endif %}
<li class="grid_2">
<div id="raceinfo">
<p>
@@ -32,11 +34,23 @@
<p>
<table class="listtable shortpadded" width="100%">
<tbody>
{% if race.sessiontype == 'race' %}
<tr>
<th>Course</th><td>{{ race.course }}</td>
</tr>
{% else %}
<tr>
<th>Distance</th><td>{{ race.sessionvalue }} m</td>
<th>Indoor Race</th><td>To be rowed on a Concept2 ergometer</td>
</tr>
<tr>
<th>Time Zone</th><td>{{ race.timezone }}</td>
</tr>
{% endif %}
<tr>
<th>
{{ race.sessionmode }} challenge
</th><td>{{ race.sessionvalue }} {{ race.sessionunit }}
</td>
</tr>
<tr>
<th>Registration closure</th>
@@ -81,38 +95,42 @@
{% for button in buttons %}
{% if button == 'registerbutton' %}
<p>
<a href="/rowers/virtualevent/{{ race.id }}/register"
class="blue button">Register</a>
{% if race.sessiontype == 'race' %}
<a href="/rowers/virtualevent/{{ race.id }}/register">Register</a>
{% else %}
<a href="/rowers/virtualevent/{{ race.id }}/registerindoor">Register</a>
{% endif %}
</p>
{% endif %}
{% if button == 'submitbutton' %}
<a href="/rowers/virtualevent/{{ race.id }}/submit" class="blue button">Submit Result</a>
<a href="/rowers/virtualevent/{{ race.id }}/submit">Submit Result</a>
{% endif %}
{% if button == 'resubmitbutton' %}
<p>
<a href="/rowers/virtualevent/{{ race.id }}/submit"
class="blue button">Submit New Result</a>
<a href="/rowers/virtualevent/{{ race.id }}/submit">Submit New Result</a>
</p>
{% endif %}
{% if button == 'withdrawbutton' %}
<p>
<a href="/rowers/virtualevent/{{ race.id }}/withdraw"
class="blue button">Withdraw</a>
<a href="/rowers/virtualevent/{{ race.id }}/withdraw">Withdraw</a>
</p>
{% endif %}
{% if button == 'adddisciplinebutton' %}
<p>
<a href="/rowers/virtualevent/{{ race.id }}/adddiscipline"
class="blue button">
<a href="/rowers/virtualevent/{{ race.id }}/adddiscipline">
Register New Boat
</a>
</p>
{% endif %}
{% if button == 'editbutton' %}
<p>
<a href="/rowers/virtualevent/{{ race.id }}/edit"
class="blue button">Edit Race
{% if race.sessiontype == 'race' %}
<a href="/rowers/virtualevent/{{ race.id }}/edit">Edit Race
</a>
{% else %}
<a href="/rowers/virtualevent/{{ race.id }}/editindoor">Edit Race
</a>
{% endif %}
</p>
{% endif %}
{% endfor %}
@@ -135,8 +153,10 @@
<th>&nbsp;</th>
<th>&nbsp;</th>
<th>&nbsp;</th>
{% if race.sessiontype == 'race' %}
<th>Class</th>
<th>Boat</th>
{% endif %}
<th>Time</th>
<th>Distance</th>
<th>Details</th>
@@ -153,8 +173,10 @@
<td>{{ result.age }}</td>
<td>{{ result.sex }}</td>
<td>{{ result.weightcategory }}</td>
{% if race.sessiontype == 'race' %}
<td>{{ result.boatclass }}</td>
<td>{{ result.boattype }}</td>
{% endif %}
<td>{{ result.duration |durationprint:"%H:%M:%S.%f" }}</td>
<td>{{ result.distance }} m</td>
<td>
@@ -170,8 +192,10 @@
<td>{{ result.age }}</td>
<td>{{ result.sex }}</td>
<td>{{ result.weightcategory }}</td>
{% if race.sessiontype == 'race' %}
<td>{{ result.boatclass }}</td>
<td>{{ result.boattype }}</td>
{% endif %}
<td>DNS</td>
</tr>
{% endfor %}
@@ -210,8 +234,10 @@
<tr>
<th>Name</th>
<th>Team Name</th>
{% if race.sessiontype == 'race' %}
<th>Class</th>
<th>Boat</th>
{% endif %}
<th>Age</th>
<th>Gender</th>
<th>Weight Category</th>
@@ -221,8 +247,10 @@
<tr>
<td>{{ record.username }}
<td>{{ record.teamname }}</td>
{% if race.sessiontype == 'race' %}
<td>{{ record.boatclass }}</td>
<td>{{ record.boattype }}</td>
{% endif %}
<td>{{ record.age }}</td>
<td>{{ record.sex }}</td>
<td>{{ record.weightcategory }}</td>
@@ -247,6 +275,14 @@
Virtual races are intended as an informal way to add a
competitive element to training and as a quick way to set
up and manage small regattas.
</p>
<p>
On the water races are rowed on the course shown. You cannot submit results rowed
on other bodies of water.
</p>
<p>
Indoor races are open for all, wherever you live. However, be aware of the
time zone for the race window.
</p>
<p>
As a rowsandall.com user, you can
@@ -271,6 +307,10 @@
you delete the respective workout or remove your account.
By registering, you agree with this and the race rules.
</p>
<p>
If you use a manually added workout for your indoor race result,
please attach a screenshot of the ergometer display for verification.
</p>
<p>
Virtual Racing on rowsandall.com is honors based. Please be a good
sport, submit real results rowed by you, and make sure you set the

View File

@@ -32,7 +32,7 @@
</p>
<p>
{% csrf_token %}
<input class="button green" type="submit" value="Save">
<input type="submit" value="Save">
</p>
</form>
</li>