view.html 1.6 KB
Newer Older
1
{% extends 'base.html' %}
2
{% load by_mandate_url %}
3 4 5 6 7 8 9 10 11 12

{% block content %}

<a href="{% url 'representatives:index' %}">Back</a>

<p style="float: left">
  <img src="{{ representative.photo }}">
</p>

<h1>{{ representative.full_name }}</h1>
13 14 15 16 17 18 19
<p>
  <strong>
    <a href="{{ representative.current_group|by_mandate_url }}">
      {{ representative.current_group.role }} of {{ representative.current_group.group.name }}
    </a>
  </strong>
</p>
20 21 22

<p>Born in {{ representative.birth_place }} the {{ representative.birth_date }} ({{ representative.get_gender_display }})</p>
<p>{{ representative.country.name }}</p>
23 24

<h2 style="clear: both">Mandates</h2>
25
{% for mandate in representative.active_mandates %}
26 27 28 29 30 31 32 33 34
<div class="mandate">
  <h3>
    {{ mandate.group.name }}
    <small>
      {{ mandate.role }}
    </small>
  </h3>
  <p>
    {{ mandate.begin_date }} to {{ mandate.end_date }} <br>
35 36 37 38
    <a href="{{ mandate|by_mandate_url }}">
      <strong>{{ mandate.group.kind }}</strong> : <em>{{ mandate.group.name }} ({{ mandate.group.abbreviation }})</em> 
    </a>
    <br>
39 40 41 42 43 44
    Constituency : {{ mandate.constituency.name }} <br>
  </p>
</div>
<hr>
{% endfor %}

45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
<h2>Former mandates</h2>
{% for mandate in representative.former_mandates %}
<div class="mandate">
  <h3>
    {{ mandate.group.name }}
    <small>
      {{ mandate.role }}
    </small>
  </h3>
  <p>
    {{ mandate.begin_date }} to {{ mandate.end_date }} <br>
    <strong>{{ mandate.group.kind }}</strong> : <em>{{ mandate.group.name }} ({{ mandate.group.abbreviation }})</em> <br>
    Constituency : {{ mandate.constituency.name }} <br>
  </p>
</div>
<hr>
{% endfor %}


64
{% endblock %}