representative_grid.html 4.45 KB
Newer Older
Jamesie Pic's avatar
Jamesie Pic committed
1
{% extends 'base.html' %}
2
{% load i18n %}
3
{% load representatives_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
14
15

{% comment %}
<!-- TODO: layout & ordering -->
Jamesie Pic's avatar
Jamesie Pic committed
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<div class="btn-group" data-toggle="buttons">
    <label class="btn btn-default active">
        <input type="radio" name="view" id="cards" autocomplete="off" checked>
        <span class="glyphicon glyphicon-th"></span>
    </label>
    <label class="btn btn-default">
        <input type="radio" name="view" id="lists" autocomplete="off">
        <span class="glyphicon glyphicon-list"></span>
    </label>
</div>

<div class="dropdown" style="display:inline-block;">
    Order by

    <button class="btn btn-default dropdown-toggle" type="button" id="orderby" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
        Score
        <span class="caret"></span>
    </button>

    <ul class="dropdown-menu" aria-labelledby="orderby">
        <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>
    </ul>
</div>
42
{% endcomment %}
Jamesie Pic's avatar
Jamesie Pic committed
43
44
45
46
47
48
49
50
51
52

<br />

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

                    <div class="col-xs-7">
69
70
71
72
73
74
                        <h4 class="text-center">{{ representative.full_name }}</h4>
                        <p class="text-center">
                          {% if representative.country %}
                            <span class="label label-primary"><span class="glyphicon glyphicon-flag"></span></span>
                          {% endif %}
                          {% if representative.main_mandate %}
Jamesie Pic's avatar
Jamesie Pic committed
75
                            <span class="label label-primary"><span class="glyphicon glyphicon-paperclip"></span></span>
76
77
78
79
                          {% endif %}
                          {% comment %}
                          <!-- TODO: what is it ? -->
                          {% if representative. %}
Jamesie Pic's avatar
Jamesie Pic committed
80
                            <span class="label label-primary"><span class="glyphicon glyphicon-briefcase "></span></span>
81
82
                          {% endif %}
                          {% endcomment %}
Jamesie Pic's avatar
Jamesie Pic committed
83
                        </p>
84
                        {% comment %} ?
Jamesie Pic's avatar
Jamesie Pic committed
85
86
87
88
89
                        <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>
90
91
                        {% endcomment %}
                        <p class="text-right"><span class="badge">{{ representative.score.score }}</span></p>
Jamesie Pic's avatar
Jamesie Pic committed
92
93
94
95
96
97
98
99
100
                    </div>

                </div>
            </a>
        </div>
    </div>
    {% endfor %}
</div>

101
102
{% include "pagination.html" %}

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