representative_grid.html 2.83 KB
Newer Older
Jamesie Pic's avatar
Jamesie Pic committed
1
{% extends 'base.html' %}
2
{% load i18n %}
Robin's avatar
Robin committed
3
{% load memopol_tags %}
4
5

{% block title %}{% trans "Members of the European Parliement" %}{% endblock %}
Jamesie Pic's avatar
Jamesie Pic committed
6

robin Tissot's avatar
robin Tissot committed
7
{% block container-class %}custom-listMEP{% endblock %}
Jamesie Pic's avatar
Jamesie Pic committed
8
{% block content %}
Nicolas Joyard's avatar
Nicolas Joyard committed
9

10
<h1 class="text-center">{% trans "Representatives" %}</h1>
11
<p class="lead text-center">
12
  Found {{ paginator.count }} {% trans "representatives" %}.
13
</p>
14

Nicolas Joyard's avatar
Nicolas Joyard committed
15
{% include "blocks/listheader.html" %}
Jamesie Pic's avatar
Jamesie Pic committed
16

Nicolas Joyard's avatar
Nicolas Joyard committed
17
<div class="row card-list">
18
19
20
21
22
23
  {% for representative in object_list %}
  <div class="col-xs-12 col-md-4 representative-card">
    <div class="thumbnail">
      <a href="{% url 'representative-detail' slug=representative.slug %}" class="custom-thumbnail custom-invisible">
        <div class="row">
          <div class="col-xs-5">
24
            <img src="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="img-responsive" style="background-image: url({{ representative.photo }});">
25
26
27
28
29
30
31
32
33
34
35
36
            <div class="custom-thumbnail-details">
              {% if representative.country %}
              <div class="icon-badge-detail">{{ representative.country|country_flag }} {{ representative.country.name }}</div>
              {% endif %}
              {% if representative.chamber %}
              <div class="icon-badge-detail">{{ representative.chamber|chamber_icon }} {{ representative.chamber.name }}</div>
              {% endif %}
              {% if representative.main_mandate.group %}
              <div class="icon-badge-detail">{{ representative.main_mandate.group|group_icon }} {{ representative.main_mandate.group.abbreviation }}</div>
              {% endif %}
            </div>
          </div>
Jamesie Pic's avatar
Jamesie Pic committed
37

38
39
          <div class="col-xs-7">
            <h4 class="text-center">{{ representative.full_name }}</h4>
Nicolas Joyard's avatar
Nicolas Joyard committed
40
41
            <p class="text-center lead">
              <br>
42
43
44
45
46
47
48
49
50
51
              {% if representative.country %}
              <a class="icon-badge" href="{% country_url representative.country %}" title="{{ representative.country.name }}">{{ representative.country|country_flag }}</a>
              {% endif %}
              {% if representative.chamber %}
              <a class="icon-badge" href="{% chamber_url representative.chamber %}" title="{{ representative.chamber.name }}">{{ representative.chamber|chamber_icon }}</a>
              {% endif %}
              {% if representative.main_mandate.group %}
              <a class="icon-badge" href="{% group_url representative.main_mandate.group %}" title="{{ representative.main_mandate.group.name }}">{{ representative.main_mandate.group|group_icon }}</a>
              {% endif %}
            </p>
Nicolas Joyard's avatar
Nicolas Joyard committed
52
            <p class="text-right">{{ representative.score.score|score_badge }}</p>
53
          </div>
Jamesie Pic's avatar
Jamesie Pic committed
54
55

        </div>
56
      </a>
Jamesie Pic's avatar
Jamesie Pic committed
57
    </div>
58
59
  </div>
  {% empty %}
60
    {% trans "No representatives found !" %}
61
  {% endfor %}
Jamesie Pic's avatar
Jamesie Pic committed
62
63
</div>

Nicolas Joyard's avatar
Nicolas Joyard committed
64
{% include "blocks/listfooter.html" %}
65

Jamesie Pic's avatar
Jamesie Pic committed
66
{% endblock %}