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

AAC Results{% if title %}: {% if ltype == 'licence' %}Licence {% endif %}{{ title }}{% endif %}{% if year %} ({{ year }}){% endif %}

{% if ltype == 'search' -%} {% include 'search.html' with context %} {%- 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|e, row.surname|e) -%} {%- if ltype != 'event' -%} {%- endif -%} {%- endfor -%}
PositionName LicenceTime Average PaceRaceDate Notes
Position {{ row.position|e }} Name {{ person }} Licence {{ row.licence|e }} Time {{ row.time|e }} Average Pace {% if row.distance is number and row.distance|int != 0 %}{{ (row.time / row.distance) | pace }} min/KM{% endif %}Race {{ row.event|e }} ({{ row.distance|e }} KM)Date {{ row.date|cleandate|e }} Notes {%- if row.sex and row.sexposition and row.sexposition | int <= 100 %}{{ row.sexposition|ordinal|e }} {{ row.sex|lower|e }}{% 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|e }} in category{% endif -%}
{%- endif %}