{% extends "base.html" %}
{% block title %}Person {{person}}{% endblock %}
{% block contentheader %}
<h2> {{person.fullname|safe}} </h2>
{% endblock %}

{% block content %}


{% if person.mug_shot %}
    <div class="figure">
      <p> <img src="{{ person.mug_shot }}" class="thumbnail" />
      </p>
    </div>
{% endif %}
<br class="clearfloat" />

<h3>{{person.fullname|safe}} has been on expo in the following years:</h3>

<table>
<th>Expo</th><th>Logbook mentions</th><th>Survex trips</th>
{% for personexpedition in person.personexpedition_set.all %}
<tr>
    <td> <a href="{{ personexpedition.get_absolute_url }}">{{personexpedition.expedition.year}}</a>
    </td>
    <td>
    <span style="padding-left:{{personexpedition.personlogentry_set.all|length}}0px; background-color:red"></span> &nbsp;
      {{personexpedition.personlogentry_set.all|length}}  
    </td>

    <td> 
    <span style="padding-left:{{personexpedition.survexpersonrole_set.all|length}}0px; background-color:blue"></span> &nbsp;
          {{personexpedition.survexpersonrole_set.all|length}}  
    </td>
</tr>
{% endfor %}
</table>
<h3>Surveys done</h3>
Wallets and surveys mentioning <a href="/wallets/person/{{person}}">{{person.fullname|safe}}</a><br>

{% if person.blurb %}
{{person.blurb|safe}}
{% else %}
To add a blurb file for a person, create /folk/l/<id>.html and register it in /folk/folk.csv . 
Documented in <a href="/handbook/computing/folkupdate.html">/handbook/computing/folkupdate.html</a>
{% endif %}

{% endblock %}
