Private
Public Access
1
0

Challenge result made simpler

This commit is contained in:
Sander Roosendaal
2021-09-27 20:56:15 +02:00
parent 27bc739e34
commit 39e4a4c65d
3 changed files with 137 additions and 130 deletions

View File

@@ -58,17 +58,18 @@
</tr><tr>
<th>Time:</th><td>{{ workout.starttime }}</td>
</tr><tr>
<th>Distance:</th><td>{{ workout.distance }}m</td>
<th>Distance:</th><td>{{ record.distance }}m</td>
</tr><tr>
<th>Duration:</th><td>{{ workout.duration |durationprint:"%H:%M:%S.%f" }}</td>
<th>Duration:</th><td>{{ record.duration |durationprint:"%H:%M:%S.%f" }}</td>
</tr><tr>
<th>Type:</th><td>{{ workout.workouttype }}</td>
<th>Type:</th><td>{{ record.boatclass }} {{ record.boattype }}</td>
</tr><tr>
<th>Weight Category:</th><td>{{ workout.weightcategory }}</td>
<th>Weight Category:</th><td>{{ record.weightcategory }}</td>
</tr>
</table>
</li>
<li class="grid_2">
{% if workout %}
<h1>Workout Summary</h1>
<p>
@@ -76,6 +77,9 @@
{{ workout.summary }}
</pre>
</p>
{% else %}
The workout was removed by the user.
{% endif %}
</li>
{% for graph in graphs %}
<li>

View File

@@ -164,124 +164,7 @@
</div>
{% endlocaltime %}
</li>
<li class="grid_2">
<div id="registerbuttons">
{% if request.user.is_anonymous %}
<p>
Registered users of rowsandall.com can participate in this challenge.
Participation is free, unless specified differently in the race comment above.
{% if race.sessiontype == 'race' %}
Register to let others know you plan to do this challenge:
<a href="/rowers/virtualevent/{{ race.id }}/register"><h3>Register</h3></a>
{% elif race.sessiontype == 'fastest_time' %}
Register to let others know you plan to do this challenge:
<a href="/rowers/virtualevent/{{ race.id }}/register"><h3>Register</h3></a>
{% elif race.sessiontype == 'fastest_distance' %}
Register to let others know you plan to do this challenge:
<a href="/rowers/virtualevent/{{ race.id }}/register"><h3>Register</h3></a>
{% else %}
<a href="/rowers/virtualevent/{{ race.id }}/registerindoor"><h3>Register</h3></a>
{% endif %}
{% if request.user|isfollower:race.id %}
<a href="/rowers/virtualevent/{{ race.id }}/follow/"><h3>Follow this challenge</h3></a>
{% endif %}
</p>
{% else %}
<p>
See challenge rules below. Participation to this challenge is free,
unless specified differently in the challenge comment above.
</p>
<p>
Note. On this page, all times are local times in the time zone of the challenge.
</p>
<p>
{% for button in buttons %}
{% if button == 'registerbutton' %}
<p>
Register to let others know you plan to do this challenge. This also give you the option to
select your entry category:
{% if race.sessiontype == 'race' %}
<a href="/rowers/virtualevent/{{ race.id }}/register"><h3>Register</h3></a>
{% elif race.sessiontype == 'fastest_time' %}
Register to let others know you plan to do this challenge:
<a href="/rowers/virtualevent/{{ race.id }}/register"><h3>Register</h3></a>
{% elif race.sessiontype == 'fastest_distance' %}
Register to let others know you plan to do this challenge:
<a href="/rowers/virtualevent/{{ race.id }}/register"><h3>Register</h3></a>
{% else %}
<a href="/rowers/virtualevent/{{ race.id }}/registerindoor"><h3>Register</h3></a>
{% endif %}
{% if request.user|isfollower:race.id %}
<a href="/rowers/virtualevent/{{ race.id }}/follow/"><h3>Follow this challenge</h3></a>
{% endif %}
</p>
{% endif %}
{% if button == 'submitbutton' %}
<table width=100% class="shortpadded">
<tr>
<td>
<a href="/rowers/virtualevent/{{ race.id }}/submit">Submit Workout</a>
</td>
<td>
Submit a workout that is already on the site as your challenge result
</td>
</tr>
<tr>
<td>
<a href="/rowers/workout/upload/{{ race.id }}/">Upload your challenge result</a>
</td>
<td>
Upload a new workout to the site and submit it as a result. You
need a workout data file.
</td>
</tr>
{% if race.sessiontype == 'indoorrace' %}
<tr>
<td>
<a href="/rowers/workout/addmanual/{{ race.id }}">Enter your challenge result manually</a>
</td>
<td>
If you don't have a data file, enter the results
manually. If you have a photo of the monitor with the
result, it is recommended to add this to the workout.
</td>
</tr>
{% endif %}
</table>
{% endif %}
{% if button == 'resubmitbutton' %}
<p>
<a href="/rowers/virtualevent/{{ race.id }}/submit">Submit New Result</a>
</p>
{% endif %}
{% if button == 'withdrawbutton' %}
<p>
<a href="/rowers/virtualevent/{{ race.id }}/withdraw">Withdraw</a>
</p>
{% endif %}
{% if button == 'adddisciplinebutton' %}
<p>
<a href="/rowers/virtualevent/{{ race.id }}/adddiscipline">
Register New Boat
</a>
</p>
{% endif %}
{% if button == 'editbutton' %}
<p>
{% if race.sessiontype == 'race' %}
<a href="/rowers/virtualevent/{{ race.id }}/edit">Edit challenge
</a>
{% else %}
<a href="/rowers/virtualevent/{{ race.id }}/editindoor">Edit challenge
</a>
{% endif %}
</p>
{% endif %}
{% endfor %}
{% endif %}
</div>
</li>
<li class="grid_2">
<li class="grid_4">
<div id="results">
{% if race|is_final %}
<h2>Final Results</h2>
@@ -303,7 +186,7 @@
{% endif %}
<p>
<table class="listtable shortpadded" width="100%">
<table class="listtable shortpadded">
<thead>
<tr>
<th>&nbsp;</th>
@@ -477,7 +360,7 @@
</div>
</li>
{% if form %}
<li class="grid_2">
<li class="grid_4">
<p>
<h2>Filter Results</h2>
@@ -494,11 +377,129 @@
</p>
</li>
{% endif %}
<li class="grid_2">
<li class="grid_4">
<div id="registerbuttons">
{% if request.user.is_anonymous %}
<p>
Registered users of rowsandall.com can participate in this challenge.
Participation is free, unless specified differently in the race comment above.
{% if race.sessiontype == 'race' %}
Register to let others know you plan to do this challenge:
<a href="/rowers/virtualevent/{{ race.id }}/register"><h3>Register</h3></a>
{% elif race.sessiontype == 'fastest_time' %}
Register to let others know you plan to do this challenge:
<a href="/rowers/virtualevent/{{ race.id }}/register"><h3>Register</h3></a>
{% elif race.sessiontype == 'fastest_distance' %}
Register to let others know you plan to do this challenge:
<a href="/rowers/virtualevent/{{ race.id }}/register"><h3>Register</h3></a>
{% else %}
<a href="/rowers/virtualevent/{{ race.id }}/registerindoor"><h3>Register</h3></a>
{% endif %}
{% if request.user|isfollower:race.id %}
<a href="/rowers/virtualevent/{{ race.id }}/follow/"><h3>Follow this challenge</h3></a>
{% endif %}
</p>
{% else %}
<p>
See challenge rules below. Participation to this challenge is free,
unless specified differently in the challenge comment above.
</p>
<p>
Note. On this page, all times are local times in the time zone of the challenge.
</p>
<p>
{% for button in buttons %}
{% if button == 'registerbutton' %}
<p>
Register to let others know you plan to do this challenge. This also give you the option to
select your entry category:
{% if race.sessiontype == 'race' %}
<a href="/rowers/virtualevent/{{ race.id }}/register"><h3>Register</h3></a>
{% elif race.sessiontype == 'fastest_time' %}
Register to let others know you plan to do this challenge:
<a href="/rowers/virtualevent/{{ race.id }}/register"><h3>Register</h3></a>
{% elif race.sessiontype == 'fastest_distance' %}
Register to let others know you plan to do this challenge:
<a href="/rowers/virtualevent/{{ race.id }}/register"><h3>Register</h3></a>
{% else %}
<a href="/rowers/virtualevent/{{ race.id }}/registerindoor"><h3>Register</h3></a>
{% endif %}
{% if request.user|isfollower:race.id %}
<a href="/rowers/virtualevent/{{ race.id }}/follow/"><h3>Follow this challenge</h3></a>
{% endif %}
</p>
{% endif %}
{% if button == 'submitbutton' %}
<table width=100% class="shortpadded">
<tr>
<td>
<a href="/rowers/virtualevent/{{ race.id }}/submit">Submit Workout</a>
</td>
<td>
Submit a workout that is already on the site as your challenge result
</td>
</tr>
<tr>
<td>
<a href="/rowers/workout/upload/{{ race.id }}/">Upload your challenge result</a>
</td>
<td>
Upload a new workout to the site and submit it as a result. You
need a workout data file.
</td>
</tr>
{% if race.sessiontype == 'indoorrace' %}
<tr>
<td>
<a href="/rowers/workout/addmanual/{{ race.id }}">Enter your challenge result manually</a>
</td>
<td>
If you don't have a data file, enter the results
manually. If you have a photo of the monitor with the
result, it is recommended to add this to the workout.
</td>
</tr>
{% endif %}
</table>
{% endif %}
{% if button == 'resubmitbutton' %}
<p>
<a href="/rowers/virtualevent/{{ race.id }}/submit">Submit New Result</a>
</p>
{% endif %}
{% if button == 'withdrawbutton' %}
<p>
<a href="/rowers/virtualevent/{{ race.id }}/withdraw">Withdraw</a>
</p>
{% endif %}
{% if button == 'adddisciplinebutton' %}
<p>
<a href="/rowers/virtualevent/{{ race.id }}/adddiscipline">
Register New Boat
</a>
</p>
{% endif %}
{% if button == 'editbutton' %}
<p>
{% if race.sessiontype == 'race' %}
<a href="/rowers/virtualevent/{{ race.id }}/edit">Edit challenge
</a>
{% else %}
<a href="/rowers/virtualevent/{{ race.id }}/editindoor">Edit challenge
</a>
{% endif %}
</p>
{% endif %}
{% endfor %}
{% endif %}
</div>
</li>
<li class="grid_4">
<div id="registered">
{% if records %}
<h2>Registered Competitors</h2>
<table class="listtable shortpadded" width="100%">
<table class="listtable shortpadded">
<thead>
<tr>
<th>Name</th>

View File

@@ -1,4 +1,4 @@
/* http://meyerweb.com/eric/tools/css/reset/
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
@@ -12,8 +12,8 @@ b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
@@ -24,7 +24,7 @@ time, mark, audio, video {
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
@@ -45,6 +45,8 @@ q:before, q:after {
table {
border-collapse: collapse;
border-spacing: 0;
word-wrap: break-word;
table-layout: fixed;
}
/* apply a natural box layout model to all elements, but allowing components to change */