adding ranking
This commit is contained in:
@@ -267,7 +267,7 @@
|
||||
<h2>Results</h2>
|
||||
{% endif %}
|
||||
</p>
|
||||
{% if results or dns %}
|
||||
{% if results or dns or dnf %}
|
||||
<p>
|
||||
<table class="listtable shortpadded" width="100%">
|
||||
<thead>
|
||||
@@ -349,6 +349,32 @@
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% for result in dnf %}
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>{{ result.username }}</td>
|
||||
<td>{{ result.teamname }}</td>
|
||||
<td>{{ result.age }}</td>
|
||||
<td>{{ result.sex }}</td>
|
||||
<td>{{ result.weightcategory }}</td>
|
||||
<td>
|
||||
{% if result.adaptiveclass == 'None' %}
|
||||
|
||||
{% else %}
|
||||
{{ result.adaptiveclass }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ result.boatclass }}</td>
|
||||
{% if race.sessiontype == 'race' %}
|
||||
<td>{{ result.boattype }}</td>
|
||||
{% endif %}
|
||||
<td>DNF</td>
|
||||
<td>
|
||||
<a href="/rowers/workout/{{ result.workoutid|encode }}/view/entry/{{ result.id }}/">
|
||||
Details</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% for result in dns %}
|
||||
<tr>
|
||||
<td> </td>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<h2>Results</h2>
|
||||
{% endif %}
|
||||
</p>
|
||||
{% if results or dns %}
|
||||
{% if results or dns or dnf %}
|
||||
<p>
|
||||
<table class="listtable shortpadded" width="100%">
|
||||
<thead>
|
||||
@@ -108,6 +108,32 @@
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% for result in dnf %}
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>{{ result.username }}</td>
|
||||
<td>{{ result.teamname }}</td>
|
||||
<td>{{ result.age }}</td>
|
||||
<td>{{ result.sex }}</td>
|
||||
<td>{{ result.weightcategory }}</td>
|
||||
<td>
|
||||
{% if result.adaptiveclass == 'None' %}
|
||||
|
||||
{% else %}
|
||||
{{ result.adaptiveclass }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ result.boatclass }}</td>
|
||||
{% if race.sessiontype == 'race' %}
|
||||
<td>{{ result.boattype }}</td>
|
||||
{% endif %}
|
||||
<td>
|
||||
<a href="/rowers/workout/{{ result.workoutid|encode }}/view/entry/{{ result.id }}/">
|
||||
Details</a>
|
||||
</td>
|
||||
<td>DNF</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% for result in dns %}
|
||||
<tr>
|
||||
<td> </td>
|
||||
|
||||
@@ -1072,6 +1072,12 @@ def virtualevent_view(request,id=0):
|
||||
workoutid__isnull=True,
|
||||
)
|
||||
|
||||
dnf = resultobj.objects.filter(
|
||||
race=race,
|
||||
workoutid__isnull=False,
|
||||
coursecompleted=False,
|
||||
)
|
||||
|
||||
|
||||
if not request.user.is_anonymous:
|
||||
if race_can_register(r,race):
|
||||
@@ -1143,6 +1149,7 @@ def virtualevent_view(request,id=0):
|
||||
adaptiveclass__in=adaptiveclass,
|
||||
age__gte=age_min,
|
||||
age__lte=age_max,
|
||||
coursecompleted=True,
|
||||
).order_by("duration")
|
||||
else:
|
||||
results = resultobj.objects.filter(
|
||||
@@ -1154,6 +1161,7 @@ def virtualevent_view(request,id=0):
|
||||
adaptiveclass__in=adaptiveclass,
|
||||
age__gte=age_min,
|
||||
age__lte=age_max,
|
||||
coursecompleted=True,
|
||||
).order_by("duration","-distance")
|
||||
|
||||
if entrycategory is not None:
|
||||
@@ -1179,6 +1187,8 @@ def virtualevent_view(request,id=0):
|
||||
coursecompleted=True,
|
||||
).order_by("duration","-distance")
|
||||
|
||||
|
||||
|
||||
if results:
|
||||
form = RaceResultFilterForm(records=records)
|
||||
else:
|
||||
@@ -1221,6 +1231,7 @@ def virtualevent_view(request,id=0):
|
||||
'results':results,
|
||||
'buttons':buttons,
|
||||
'dns':dns,
|
||||
'dnf':dnf,
|
||||
'records':records,
|
||||
'racelogo':racelogo,
|
||||
'form':form,
|
||||
|
||||
Reference in New Issue
Block a user