60 lines
2.1 KiB
HTML
60 lines
2.1 KiB
HTML
{% set ns = namespace() -%}
|
|
|
|
{% include 'head.html' with context %}
|
|
<article>
|
|
<h1>AAC Statistics {% if title %}: {{ title }}{% endif %}{% if year %} {{ year }}{% endif %}</h1>
|
|
{% if results -%}
|
|
{%- set ns.total = 0 -%}
|
|
{%- if 'count' in results -%}
|
|
{%- set ns.total = results['count'] -%}
|
|
{%- endif -%}
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Position</th>
|
|
{% if ltype != 'person' %}
|
|
<th>Name</th>
|
|
<th>Licence</th>
|
|
{% endif %}
|
|
<th>Time</th>
|
|
<th>Average Pace</th>
|
|
{% if ltype != 'event' %}
|
|
<th>Event</th>
|
|
{% endif %}
|
|
<th>Date</th>
|
|
<th>Notes</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{%- for row in results['rows'] -%}
|
|
{%- set person='{} {}'.format(row.name, row.surname) -%}
|
|
{%- if distance %}{# set total_km += row.distance #}{% endif -%}
|
|
<tr>
|
|
<td>{{ row.position }}</td>
|
|
{%- if ltype != 'person' -%}
|
|
<td><a href="{{ url_for('person', title=person, start=None) }}">{{ person }}</a></td>
|
|
<td><a href="{{ url_for('licence', title=row.licence, year=row.date|year, start=None, limit=ns.limit) }}">{{ row.licence }}</a></td>
|
|
{%- endif -%}
|
|
<td>{{ row.time }}</td>
|
|
<td class="nowrap">{% if row.distance is number %}{{ (row.time / row.distance) | pace }} min/KM{% endif %}</td>
|
|
{%- if ltype != 'event' -%}
|
|
<td><a href="{{ url_for('race', title=row.event, year=row.date|year, start=None, limit=ns.limit) }}">{{ row.event }} ({{ row.distance }} KM)</a></td>
|
|
{%- endif -%}
|
|
<td>{{ row.date | cleandate }}</td>
|
|
<td>
|
|
{%- if row.sex and row.sexposition and row.sexposition | int <= 100 %}{{ row.sexposition | ordinal }} {{ row.sex.lower() }}{% endif -%}
|
|
{%- if row.sexposition and row.sexposition | int <= 100 and row.catposition and row.catposition | int <= 100 %} and {% endif -%}
|
|
{%- if row.catposition and row.catposition | int <= 100 %}{{ row.catposition | ordinal }} in category{% endif -%}
|
|
</td>
|
|
</tr>
|
|
{%- endfor -%}
|
|
</tbody>
|
|
</table>
|
|
{%- endif %}
|
|
</article>
|
|
<footer>
|
|
{% include 'prevnext.html' with context %}
|
|
</footer>
|
|
</body>
|
|
</html>
|