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

AAC Results: Search

{% include 'search.html' with context %} {% else %}

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

{%- endif -%} {% if results -%} {%- set ns.total = 0 -%} {%- if 'count' in results -%} {%- set ns.total = results['count'] -%} {%- endif -%} {% if ltype != 'event' %} {% endif %} {%- for row in results['rows'] -%} {%- set person = '{} {}'.format(row.name or '', row.surname or '') -%} {%- if ltype != 'event' -%} {%- endif -%} {%- endfor -%}
Position Name Licence Time Average PaceRaceDate Notes
Position {{ row.position|e }}{% if row.finishers %} / {{ row.finishers }}{% endif %} Name {{ person|trim|e }} Licence {% if row.licence %}{{ row.licence|trim|e }}{% endif %} Time {{ row.time|e }} Average Pace {% if row.distance is number and row.distance|float != 0 %}{{ (row.time / row.distance|float) | pace }} min/KM{% endif %}Race {{ row.event|trim|e }} ({{ row.distance|trim|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|gender|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 %}