representative_grid.html 4.91 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 %}
9
<h1 class="text-center">{% trans "Members of the European Parliement" %}</h1>
10
11
12
<p class="lead text-center">
{{ paginator.count }} {% trans "MEP" %}{% if search.country %} {% trans "from" %} {{ search.country }}{% endif %}{% if search.group %}, {% trans "members of" %} {{ search.group }}{% endif %}{% if search.delegation %}, {% trans "working in" %} {{ search.delegation }}{% endif %}{% if search.commitee %}, {% trans "on" %} {{ search.commitee }}{% endif %}.
</p>
13

robin Tissot's avatar
robin Tissot committed
14
15
16
17
18
19
20
21
<div class="row">
    <a href="?{{ searchparameters }}&csv" class="btn btn-default">
      <span class="glyphicon glyphicon-file"> {% trans "Download as csv." %}</span>
    </a>

  {% comment %}
  <!-- TODO: layout & ordering -->
  <div class="btn-group" data-toggle="buttons">
Jamesie Pic's avatar
Jamesie Pic committed
22
    <label class="btn btn-default active">
robin Tissot's avatar
robin Tissot committed
23
24
      <input type="radio" name="view" id="cards" autocomplete="off" checked>
      <span class="glyphicon glyphicon-th"></span>
Jamesie Pic's avatar
Jamesie Pic committed
25
26
    </label>
    <label class="btn btn-default">
robin Tissot's avatar
robin Tissot committed
27
28
      <input type="radio" name="view" id="lists" autocomplete="off">
      <span class="glyphicon glyphicon-list"></span>
Jamesie Pic's avatar
Jamesie Pic committed
29
30
    </label>

robin Tissot's avatar
robin Tissot committed
31
32
33
  </div>

  <div class="dropdown" style="display:inline-block;">
Jamesie Pic's avatar
Jamesie Pic committed
34
35
36
    Order by

    <button class="btn btn-default dropdown-toggle" type="button" id="orderby" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
robin Tissot's avatar
robin Tissot committed
37
38
      Score
      <span class="caret"></span>
Jamesie Pic's avatar
Jamesie Pic committed
39
40
41
    </button>

    <ul class="dropdown-menu" aria-labelledby="orderby">
robin Tissot's avatar
robin Tissot committed
42
43
44
45
      <li class="disabled"><a href="#">Score</a></li>
      <li><a href="#">Country</a></li>
      <li><a href="#">Party</a></li>
      <li><a href="#">Group</a></li>
Jamesie Pic's avatar
Jamesie Pic committed
46
    </ul>
robin Tissot's avatar
robin Tissot committed
47
48
  </div>
  {% endcomment %}
Jamesie Pic's avatar
Jamesie Pic committed
49
50
</div>

robin Tissot's avatar
robin Tissot committed
51
<br/>
Jamesie Pic's avatar
Jamesie Pic committed
52
53

<div class="row">
54
    {% for representative in object_list %}
Jamesie Pic's avatar
Jamesie Pic committed
55
56
    <div class="col-xs-12 col-md-4">
        <div class="thumbnail">
57
            <a href="{{ representative.get_absolute_url }}" class="custom-thumbnail custom-invisible">
Jamesie Pic's avatar
Jamesie Pic committed
58
59
                <div class="row">
                    <div class="col-xs-5">
60
                        <img class="img-responsive" src="{{ representative.photo }}" width="158px">
Jamesie Pic's avatar
Jamesie Pic committed
61
62
                        <div class="custom-thumbnail-details">
                            <p>
63
                                {{ representative.country|country_flag }} {{ representative.country.name }}<br>
64
                              <!-- Group -->
65
66
67
68
69
                                {{ representative.main_mandate }}<br>
                                {% comment %}
                                <!-- ? -->
                                <span class="glyphicon glyphicon-briefcase "></span> {{ representative. }}
                                {% endcomment %}
Jamesie Pic's avatar
Jamesie Pic committed
70
71
72
73
74
                            </p>
                        </div>
                    </div>

                    <div class="col-xs-7">
75
76
77
                        <h4 class="text-center">{{ representative.full_name }}</h4>
                        <p class="text-center">
                          {% if representative.country %}
78
79
80
                            <a href="{% country_url representative.country %}" title="{{ representative.country.name }}">
                                {{ representative.country|country_flag }}
                            </a>
81
                          {% endif %}
82
83
84
85
                          {% if representative.chamber %}
                            <a href="{% chamber_url representative.chamber %}" title="{{ representative.chamber.name }}">
                                {{ representative.chamber|chamber_icon }}
                            </a>
86
                          {% endif %}
87
88
89
90
                          {% if representative.main_mandate.group %}
                            <a href="{% group_url representative.main_mandate.group %}" title="{{ representative.main_mandate.group.name }}">
                                {{ representative.main_mandate.group|group_icon }}
                            </a>
91
                          {% endif %}
Jamesie Pic's avatar
Jamesie Pic committed
92
                        </p>
93
                        {% comment %} ?
Jamesie Pic's avatar
Jamesie Pic committed
94
95
96
97
98
                        <p class="text-center small">
                            <span class="label label-primary"><span class="glyphicon glyphicon-pushpin "></span></span>
                            <span class="label label-primary"><span class="glyphicon glyphicon-pushpin "></span></span>
                            <span class="label label-primary"><span class="glyphicon glyphicon-pushpin "></span></span>
                        </p>
99
100
                        {% endcomment %}
                        <p class="text-right"><span class="badge">{{ representative.score.score }}</span></p>
Jamesie Pic's avatar
Jamesie Pic committed
101
102
103
104
105
106
                    </div>

                </div>
            </a>
        </div>
    </div>
107
108
    {% empty %}
    {% trans "No MEPs found !" %}
Jamesie Pic's avatar
Jamesie Pic committed
109
110
111
    {% endfor %}
</div>

112
113
{% include "pagination.html" %}

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