Basic functionality is there
This commit is contained in:
69
boatmovers/templates/boatmovers.html
Normal file
69
boatmovers/templates/boatmovers.html
Normal file
@@ -0,0 +1,69 @@
|
||||
<p>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Rank</th>
|
||||
<th>Score</th>
|
||||
<th>Name</th><td></td>
|
||||
<th>Club</th>
|
||||
<th>Gender</th>
|
||||
<th>Year of Birth</th>
|
||||
</tr>
|
||||
{% for athlete in athletes %}
|
||||
<tr>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
<td>{{ athlete.trueskill_exposed|floatformat:2 }}</td>
|
||||
<td>{{ athlete.first_name }}</td>
|
||||
<td>{{ athlete.last_name }}</td>
|
||||
<td>{{ athlete.club }}</td>
|
||||
<td>{{ athlete.gender }}</td>
|
||||
<td>{{ athlete.birth_year }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</p>
|
||||
<p>
|
||||
This ranking was based on results from following races:
|
||||
</p>
|
||||
<p>
|
||||
<table>
|
||||
{% for race in races %}
|
||||
<tr>
|
||||
<td>{{ race.date }}</td><td>{{ race.name }}</td>
|
||||
<td>
|
||||
<a href="race/{{ race.id }}">View Race</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</p>
|
||||
{% if user.is_authenticated and user.is_staff %}
|
||||
<p>
|
||||
Unprocessed races
|
||||
</p>
|
||||
<p>
|
||||
<table>
|
||||
{% for race in new_races %}
|
||||
<tr>
|
||||
<td>{{ race.date }}</td><td>{{ race.name }}</td>
|
||||
<td>
|
||||
<a href="race/{{ race.id }}">Manage Race</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</p>
|
||||
<p>
|
||||
<a href="athlete/add/">Add Athlete</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="crew/add/">Add Crew</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
<p>
|
||||
<a href="race/add/">Add Race</a>
|
||||
</p>
|
||||
{% if user.is_authenticated and user.is_staff %}
|
||||
<p>
|
||||
<a href="result/add/">Add Result</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
4
boatmovers/templates/boatmovers/race_form.html
Normal file
4
boatmovers/templates/boatmovers/race_form.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<form action="" method="post">{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" value="Create" />
|
||||
</form>
|
||||
4
boatmovers/templates/boatmovers/result_form.html
Normal file
4
boatmovers/templates/boatmovers/result_form.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<form action="" method="post">{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" value="Create" />
|
||||
</form>
|
||||
45
boatmovers/templates/race.html
Normal file
45
boatmovers/templates/race.html
Normal file
@@ -0,0 +1,45 @@
|
||||
<h1>
|
||||
{{ race.name }}
|
||||
</h1>
|
||||
<p>
|
||||
{{ race.date }}
|
||||
</p>
|
||||
<p>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Order</th>
|
||||
<th>Crew</th><td></td>
|
||||
</tr>
|
||||
{% for result in results %}
|
||||
<tr>
|
||||
<td>{{ result.order }}</td>
|
||||
<td>{{ result.crew.name }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</p>
|
||||
{% if user.is_authenticated and user.is_staff %}
|
||||
{% if race.verified %}
|
||||
<p>
|
||||
Race has been verified
|
||||
</p>
|
||||
{% if race.processed %}
|
||||
<p>
|
||||
Race has been processed
|
||||
</p>
|
||||
{% else %}
|
||||
<p>
|
||||
Race is not processed. <a href="process/">Process Race</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<p>
|
||||
Race is not verified. <a href="verify/">Verify Race</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if not race.verified and not race.processed %}
|
||||
<p>
|
||||
<a href="/boatmovers/result/add/">Add Result</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user