Commit fe819154 authored by Nicolas Joyard's avatar Nicolas Joyard

Add group icons

parent 505bbcf2
......@@ -10,7 +10,7 @@
- The Political Memory of </title>
<link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.0eebcec6fcc2.css" type="text/css" />
<link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.6aeeaa87703d.css" type="text/css" />
<script type="text/javascript" src="/static/collected/libs/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="/static/collected/libs/bootstrap/dist/js/bootstrap.js"></script>
......@@ -252,7 +252,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
SD
<span class="group-icon group-icon-sd"></span> SD
</a>
</td>
<td>
......@@ -288,7 +288,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
SD
<span class="group-icon group-icon-sd"></span> SD
</a>
</td>
<td>
......@@ -324,7 +324,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
EPP
<span class="group-icon group-icon-epp"></span> EPP
</a>
</td>
<td>
......@@ -360,7 +360,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
EPP
<span class="group-icon group-icon-epp"></span> EPP
</a>
</td>
<td>
......@@ -396,7 +396,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
EPP
<span class="group-icon group-icon-epp"></span> EPP
</a>
</td>
<td>
......@@ -432,7 +432,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Alliance%20of%20Liberals%20and%20Democrats%20for%20Europe/'>
ALDE
<span class="group-icon group-icon-alde"></span> ALDE
</a>
</td>
<td>
......@@ -468,7 +468,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Confederal%20Group%20of%20the%20European%20United%20Left%20-%20Nordic%20Green%20Left/'>
GUE/NGL
<span class="group-icon group-icon-guengl"></span> GUE/NGL
</a>
</td>
<td>
......@@ -504,7 +504,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Greens/European%20Free%20Alliance/'>
Greens/EFA
<span class="group-icon group-icon-greensefa"></span> Greens/EFA
</a>
</td>
<td>
......@@ -540,7 +540,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
EPP
<span class="group-icon group-icon-epp"></span> EPP
</a>
</td>
<td>
......@@ -576,7 +576,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
EPP
<span class="group-icon group-icon-epp"></span> EPP
</a>
</td>
<td>
......@@ -612,7 +612,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
SD
<span class="group-icon group-icon-sd"></span> SD
</a>
</td>
<td>
......@@ -648,7 +648,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Greens/European%20Free%20Alliance/'>
Greens/EFA
<span class="group-icon group-icon-greensefa"></span> Greens/EFA
</a>
</td>
<td>
......
......@@ -10,7 +10,7 @@
- The Political Memory of </title>
<link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.0eebcec6fcc2.css" type="text/css" />
<link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.6aeeaa87703d.css" type="text/css" />
<script type="text/javascript" src="/static/collected/libs/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="/static/collected/libs/bootstrap/dist/js/bootstrap.js"></script>
......@@ -207,7 +207,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Greens/European%20Free%20Alliance/'>
Greens/EFA
<span class="group-icon group-icon-greensefa"></span> Greens/EFA
</a>
</td>
<td>
......
......@@ -10,7 +10,7 @@
- The Political Memory of </title>
<link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.0eebcec6fcc2.css" type="text/css" />
<link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.6aeeaa87703d.css" type="text/css" />
<script type="text/javascript" src="/static/collected/libs/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="/static/collected/libs/bootstrap/dist/js/bootstrap.js"></script>
......@@ -265,7 +265,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
SD
<span class="group-icon group-icon-sd"></span> SD
</a>
</td>
<td>
......@@ -301,7 +301,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
EPP
<span class="group-icon group-icon-epp"></span> EPP
</a>
</td>
<td>
......@@ -337,7 +337,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
SD
<span class="group-icon group-icon-sd"></span> SD
</a>
</td>
<td>
......@@ -373,7 +373,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/European%20Conservatives%20and%20Reformists%20Group/'>
ECR
<span class="group-icon group-icon-ecr"></span> ECR
</a>
</td>
<td>
......@@ -409,7 +409,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
SD
<span class="group-icon group-icon-sd"></span> SD
</a>
</td>
<td>
......@@ -445,7 +445,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
EPP
<span class="group-icon group-icon-epp"></span> EPP
</a>
</td>
<td>
......@@ -481,7 +481,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
EPP
<span class="group-icon group-icon-epp"></span> EPP
</a>
</td>
<td>
......@@ -517,7 +517,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Alliance%20of%20Liberals%20and%20Democrats%20for%20Europe/'>
ALDE
<span class="group-icon group-icon-alde"></span> ALDE
</a>
</td>
<td>
......@@ -553,7 +553,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
SD
<span class="group-icon group-icon-sd"></span> SD
</a>
</td>
<td>
......@@ -589,7 +589,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
SD
<span class="group-icon group-icon-sd"></span> SD
</a>
</td>
<td>
......@@ -625,7 +625,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
SD
<span class="group-icon group-icon-sd"></span> SD
</a>
</td>
<td>
......@@ -661,7 +661,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Greens/European%20Free%20Alliance/'>
Greens/EFA
<span class="group-icon group-icon-greensefa"></span> Greens/EFA
</a>
</td>
<td>
......
......@@ -10,7 +10,7 @@
- The Political Memory of </title>
<link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.0eebcec6fcc2.css" type="text/css" />
<link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.6aeeaa87703d.css" type="text/css" />
<script type="text/javascript" src="/static/collected/libs/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="/static/collected/libs/bootstrap/dist/js/bootstrap.js"></script>
......@@ -241,7 +241,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Greens/European%20Free%20Alliance/'>
Greens/EFA
<span class="group-icon group-icon-greensefa"></span> Greens/EFA
</a>
</td>
<td>
......@@ -277,7 +277,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
EPP
<span class="group-icon group-icon-epp"></span> EPP
</a>
</td>
<td>
......@@ -313,7 +313,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
EPP
<span class="group-icon group-icon-epp"></span> EPP
</a>
</td>
<td>
......@@ -349,7 +349,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
SD
<span class="group-icon group-icon-sd"></span> SD
</a>
</td>
<td>
......@@ -385,7 +385,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
EPP
<span class="group-icon group-icon-epp"></span> EPP
</a>
</td>
<td>
......@@ -421,7 +421,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Alliance%20of%20Liberals%20and%20Democrats%20for%20Europe/'>
ALDE
<span class="group-icon group-icon-alde"></span> ALDE
</a>
</td>
<td>
......@@ -457,7 +457,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>
SD
<span class="group-icon group-icon-sd"></span> SD
</a>
</td>
<td>
......@@ -493,7 +493,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/European%20Conservatives%20and%20Reformists%20Group/'>
ECR
<span class="group-icon group-icon-ecr"></span> ECR
</a>
</td>
<td>
......@@ -529,7 +529,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Alliance%20of%20Liberals%20and%20Democrats%20for%20Europe/'>
ALDE
<span class="group-icon group-icon-alde"></span> ALDE
</a>
</td>
<td>
......@@ -565,7 +565,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People&#39;s%20Party%20(Christian%20Democrats)/'>
EPP
<span class="group-icon group-icon-epp"></span> EPP
</a>
</td>
<td>
......@@ -601,7 +601,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Alliance%20of%20Liberals%20and%20Democrats%20for%20Europe/'>
ALDE
<span class="group-icon group-icon-alde"></span> ALDE
</a>
</td>
<td>
......@@ -637,7 +637,7 @@
</td>
<td>
<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Alliance%20of%20Liberals%20and%20Democrats%20for%20Europe/'>
ALDE
<span class="group-icon group-icon-alde"></span> ALDE
</a>
</td>
<td>
......
......@@ -36,6 +36,7 @@ class RepresentativeDetailTest(UrlGetTestMixin, TestCase):
def test_current_mandate_display(self):
expected = ''.join((
"<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>", # noqa
"<span class='group-icon group-icon-sd'></span>",
"Member of Group of the Progressive Alliance of Socialists and Democrats in the European Parliament", # noqa
"</a>",
))
......
......@@ -16,7 +16,7 @@ setup(name='political-memory',
'django-datetime-widget>=0.9,<1.0',
'django-filter>=0.11,<0.12',
'django-representatives-votes==0.0.15',
'django-representatives==0.0.19',
'django-representatives==0.0.21',
'django-taggit>=0.17,<0.18',
'django>=1.8,<1.9',
'djangorestframework>=3.2.0,<3.3.0',
......
......@@ -6,6 +6,7 @@
@import 'legislature';
@import 'positions';
@import 'chambers';
@import 'groups';
body {
background: #E5E5E5;
......
.group-icon {
display: inline-block;
width: 1.5em;
height: 1.5em;
vertical-align: bottom;
background-size: 100%;
&.group-icon-alde {
background-image: url(../images/group-alde.png);
}
&.group-icon-ecr {
background-image: url(../images/group-ecr.png);
}
&.group-icon-enf {
background-image: url(../images/group-enf.png);
}
&.group-icon-efdd {
background-image: url(../images/group-efdd.png);
}
&.group-icon-epp {
background-image: url(../images/group-epp.png);
}
&.group-icon-guengl {
background-image: url(../images/group-guengl.png);
}
&.group-icon-greensefa {
background-image: url(../images/group-greensefa.png);
}
&.group-icon-sd {
background-image: url(../images/group-sd.png);
}
}
......@@ -32,8 +32,7 @@
%th Party
%td<
%a{:href => "{{ representative.main_mandate.group.get_absolute_url }}"}
{{ representative.main_mandate.role }} of
{{ representative.main_mandate.group.name }}
= representative.main_mandate|mandate_icon
%tr
%th Biography
%td<
......
......@@ -19,5 +19,7 @@
%a{'href': '{{ group.get_absolute_url }}'}=
- if group.kind == 'chamber'
= group|chamber_icon
- elif group.kind == 'group'
= group|group_long_icon
- else
= group.name
......@@ -23,6 +23,6 @@
= representative.country|country_flag
%li.mandate
%a{'href': "{{ representative.main_mandate.group.get_absolute_url }}"}
= representative.main_mandate.group.abbreviation
= representative.main_mandate.group|group_icon
%li.score
= representative.score.score|score_label
......@@ -56,7 +56,7 @@
%td
%a{'href': "{{ representative.main_mandate.group.get_absolute_url }}"}
= representative.main_mandate.group.abbreviation
= representative.main_mandate.group|group_icon
%td
= representative.score.score|score_label
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment