{% extends "base.html" %} {% block title %}Person {{personexpedition.person}} for {{personexpedition.expedition}}{% endblock %} {% block content %}

{{personexpedition.person|safe}} : {{personexpedition.expedition}}

{{message}}

{{personexpedition.surveyedleglength|stringformat:".1f"}} m surveyed this year.

Other years:  {% for otherpersonexpedition in personexpedition.person.personexpedition_set.all %} {% if otherpersonexpedition == personexpedition %} | {{otherpersonexpedition.expedition.year}} {% else %} | {{ otherpersonexpedition.expedition.year }} {% endif %} {% endfor %}

Wallet status {% for otherpersonexpedition in personexpedition.person.personexpedition_set.all %} | {{ otherpersonexpedition.expedition.year }} {% endfor %}

Table of all trips and surveys aligned by date

{% for persondate in personchronology %} {% if persondate.1 %} {% else %} {% endif %} {% if persondate.2 %} {%comment%} {%endcomment%} {% else %} {% endif %} {% endfor %}
DateTripsSurveys
{{persondate.0}}{{persondate.1.logbook_entry.title|safe}} {{persondate.1.logbook_entry.place|safe}} {{persondate.2.name}} {% for survexpersonrole in persondate.2.survexpersonrole_set.all %} {{survexpersonrole.nrole}} {% endfor %} {{persondate.2.legslength|stringformat:".1f"}} m

Horrible bug here but only when there is more than one survex block per day, or is there ?!

WHat we thought was the bug: e.g. see Wookey 1999 where there are 3 eiscream survex blocks on 5th August. it duplicates the entry but gets it wrong. The length from the first block is displayed twice but there should be 3 rows: eiscream, eiscream2, eiscream3.

The interaction of django database query idioms with django HTML templating language is a bit impenetrable here. I blame Aaron Curtis who was too fond of being clever with the Django templating system instead or writing it in python anyone could understand.
- The template is in troggle/templates/personexpedition.html
- The code is in function personexpedition() which calls get_person_chronology() in troggle/core/views/logbooks.py
- the connection between the two is made in the URL resolver in troggle/urls.py

To be fixed!

What we now know

The eiscream.svx file does indeed record 3 blocks: eiscream, eiscream2 & eiscream3. But (more) careful inspection shows that eiscream2 and eiscream3 are in the year 2000, not in 1999. So they absolutely should not be shown here. So maybe everything is correct after all. (Well, apart from the duplication.)

{% endblock %}