AACResults/templates/list-rankings.html

38 lines
954 B
HTML
Raw Normal View History

2018-08-14 08:55:34 +00:00
{% set ns = namespace() -%}
{% include 'head.html' with context %}
<article>
<h1>AAC Statistics: {% if year %} {{ year }}{% endif %}{% if title %} {{ title | title }}{% endif %}</h1>
{% if results -%}
{%- set ns.total = 0 -%}
{%- if 'count' in results -%}
{%- set ns.total = results['count'] -%}
{%- endif -%}
<table>
<thead>
<tr>
<th>Name</th>
<th>Average position</th>
<th>Sum of race positions</th>
<th>Number of races</th>
</tr>
</thead>
<tbody>
{%- for row in results['rows'] -%}
<tr>
<td><a href="{{ url_for('person', title=row.person, year=year, start=None, limit=ns.limit) }}">{{ row.person }}</a></td>
<td>{{ row.score }}</td>
<td>{{ row.positions }}</td>
<td>{{ row.races }}</td>
</tr>
{%- endfor -%}
</tbody>
</table>
{%- endif %}
</article>
<footer>
{% include 'prevnext.html' with context %}
</footer>
</body>
</html>