2011-07-11 02:10:22 +01:00
{% extends "base.html" %}
2021-04-30 22:44:03 +01:00
{% block title %}Person {{personexpedition.person}} for {{personexpedition.expedition}}{% endblock %}
2011-07-11 02:10:22 +01:00
{% block content %}
< h1 >
2019-06-26 18:36:08 +01:00
< a href = "{{personexpedition.person.get_absolute_url}}" > {{personexpedition.person|safe}}< / a > :
2011-07-11 02:10:22 +01:00
< a href = "{{personexpedition.expedition.get_absolute_url}}" > {{personexpedition.expedition}}< / a >
< / h1 >
< p > {{message}}< / p >
2023-03-12 00:35:37 +00:00
< p > {{personexpedition.surveyedleglength|floatformat:1}} m surveyed this year.< / p >
2011-07-11 02:10:22 +01:00
2022-03-18 02:49:45 +00:00
< p > < b > Other years: < / b >
2011-07-11 02:10:22 +01:00
{% for otherpersonexpedition in personexpedition.person.personexpedition_set.all %}
2021-04-19 01:32:18 +01:00
{% if otherpersonexpedition == personexpedition %}
2011-07-11 02:10:22 +01:00
| < b > {{otherpersonexpedition.expedition.year}}< / b >
{% else %}
| < a href = "{{otherpersonexpedition.get_absolute_url}}" > {{ otherpersonexpedition.expedition.year }}< / a >
2021-04-19 01:32:18 +01:00
{% endif %}
2011-07-11 02:10:22 +01:00
{% endfor %}
< / p >
2022-10-11 19:33:13 +01:00
< p > Status of all wallets for < b >
< a href = "/wallets/person/{{personexpedition.person.first_name|safe}}{{personexpedition.person.last_name|safe}}" > {{personexpedition.person}}< / a >
< / b >
2022-03-18 02:49:45 +00:00
< / p >
2011-07-11 02:10:22 +01:00
< h3 > Table of all trips and surveys aligned by date< / h3 >
< div >
< table class = "survexcontibutions" >
2021-04-30 00:24:36 +01:00
< tr > < th > Date< / th > < th colspan = "2" > Trips< / th > < th colspan = "2" > Surveys< / th > < / tr >
2011-07-11 02:10:22 +01:00
{% for persondate in personchronology %}
< tr >
< td class = "date" > {{persondate.0}}< / td >
{% if persondate.1 %}
2020-07-06 01:24:43 +01:00
< td width = "35%" class = "trip" > < a href = "{{ persondate.1.logbook_entry.get_absolute_url }}" > {{persondate.1.logbook_entry.title|safe}}< / a > < / td >
2021-04-30 00:24:36 +01:00
< td > < a href = "{{ persondate.1.logbook_entry.cave.get_absolute_url }}" > {{persondate.1.logbook_entry.place|safe}}< / a > < / td >
2011-07-11 02:10:22 +01:00
{% else %}
< td colspan = "2" > < / td >
{% endif %}
{% if persondate.2 %}
2020-07-06 01:24:43 +01:00
< td class = "survexblock" > < a href = "{% url " svx " persondate . 2 . survexfile . path % } " > {{persondate.2.name}}< / a > < / td >
2023-03-12 00:35:37 +00:00
2020-07-06 01:24:43 +01:00
< td style = "text-align:right" >
2023-03-12 00:35:37 +00:00
{{persondate.2.legslength|floatformat:1}} m
2020-07-06 01:24:43 +01:00
< / td >
2011-07-11 02:10:22 +01:00
{% else %}
2020-07-06 01:24:43 +01:00
< td colspan = "3" > < / td >
2011-07-11 02:10:22 +01:00
{% endif %}
< / tr >
{% endfor %}
< / table >
< / div >
2022-12-07 18:22:09 +00:00
{% comment %}
2020-07-06 01:24:43 +01:00
< div style = "color: slategray; background-color:lightcyan" >
2022-07-22 11:41:47 +01:00
< p > Horrible convoluted bug here, but only for some survex files. Mostly, a survex block is duplicated. But not always.
2022-03-05 12:20:26 +00:00
2022-07-22 11:41:47 +01:00
< p >
e.g. see < a href = "/personexpedition/Wookey/1999" > Wookey 1999< / a > where there are one eiscream survex block on 5th August in eiscream.svx
< br > It duplicates it. Also on 4th Aug. there is only one block, but it gets shown twice.
2022-03-05 12:20:26 +00:00
2023-02-10 00:05:04 +00:00
< p > The interaction of django database query idioms with < a href = "https://docs.djangoproject.com/en/dev/ref/templates/api/" > django HTML templating language< / a > is a bit impenetrable here.
2021-04-30 00:24:36 +01:00
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.< br >
2020-07-06 01:24:43 +01:00
- The template is in < var > troggle/templates/personexpedition.html< / var >
< br >
- The code is in function < var > personexpedition()< / var > which calls
2021-04-15 17:51:01 +01:00
< var > get_person_chronology()< / var > in < var > troggle/core/views/logbooks.py< / var >
2020-07-06 01:24:43 +01:00
< br >
- the connection between the two is made in the URL resolver in < var > troggle/urls.py< / var >
< p > To be fixed!
< / div >
2022-12-07 18:22:09 +00:00
{% endcomment %}
2011-07-11 02:10:22 +01:00
{% endblock %}