{% set ns = namespace() -%} {% include 'head.html' with context %}

AAC Statistics {% if title %}: {{ title }}{% endif %}{% if year %} {{ year }}{% endif %}

{% if results -%} {%- set ns.total = 0 -%} {%- if 'count' in results -%} {%- set ns.total = results['count'] -%} {%- endif -%} {% if ltype != 'person' %} {% endif %} {% if ltype != 'event' %} {% endif %} {%- for row in results['rows'] -%} {%- set person='{} {}'.format(row.name, row.surname) -%} {%- if distance %}{# set total_km += row.distance #}{% endif -%} {%- if ltype != 'person' -%} {%- endif -%} {%- if ltype != 'event' -%} {%- endif -%} {%- endfor -%}
PositionName LicenceTime Average PaceEventDate Notes
{{ row.position }}{{ person }} {{ row.licence }}{{ row.time }} {% if row.distance is number %}{{ (row.time / row.distance) | pace }} min/KM{% endif %}{{ row.event }} ({{ row.distance }} KM){{ row.date | cleandate }} {%- if row.sex and row.sexposition and row.sexposition <= 100 %}{{ row.sexposition | ordinal }} {{ row.sex.lower() }}{% endif -%} {%- if row.sexposition and row.catposition %}/{% endif -%} {%- if row.catposition and row.catposition <= 100 %}{{ row.catposition | ordinal }} in category{% endif -%}
{%- endif %}