Private
Public Access
1
0

added race action to race list

This commit is contained in:
Sander Roosendaal
2018-04-23 21:58:55 +02:00
parent 399d907066
commit e651198dba
4 changed files with 52 additions and 5 deletions

View File

@@ -1,3 +1,4 @@
{% load rowerfilters %}
<p>
<table width="100%" class="listtable shortpadded">
<thead>
@@ -6,6 +7,7 @@
<th>Event</th>
<th>Country</th>
<th>Course</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@@ -15,6 +17,19 @@
<td><a href="/rowers/virtualevent/{{ race.id }}">{{ race.name }}</a></td>
<td>{{ race.course.country }}</td>
<td>{{ race.course.name }}</td>
<td>
{% if rower %}
{% if race|can_register:rower %}
<a class="white dot" href="/rowers/virtualevent/{{ race.id }}">&nbsp;</a>
{% elif race|can_submit:rower %}
<a class="orange dot" href="/rowers/virtualevent/{{ race.id }}">&nbsp;</a>
{% elif race|race_complete:rower %}
<a class="green dot" href="/rowers/virtualevent/{{ race.id }}">&nbsp;</a>
{% else %}
<a class="red dot" href="/rowers/virtualevent/{{ race.id }}">&nbsp;</a>
{% endif %}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>