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