Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Political Memory
memopol
Commits
0b7c86eb
Commit
0b7c86eb
authored
Aug 22, 2016
by
Nicolas Joyard
Browse files
Add website links
parent
71b8a11e
Changes
5
Hide whitespace changes
Inline
Side-by-side
static/css/custom.css
View file @
0b7c86eb
...
...
@@ -370,7 +370,13 @@ iframe {
margin-left
:
.5em
;
}
.social-icon
{
width
:
1.1em
;
height
:
1.1em
;
display
:
inline-block
;
vertical-align
:
sub
;
}
...
...
static/images/facebook.png
→
static/images/
social-
facebook.png
100644 → 100755
View replaced file @
71b8a11e
View file @
0b7c86eb
1.77 KB
|
W:
|
H:
1.71 KB
|
W:
|
H:
2-up
Swipe
Onion skin
static/images/social-twitter.png
0 → 100644
View file @
0b7c86eb
1.38 KB
static/images/twitter.png
deleted
100644 → 0
View file @
71b8a11e
3.13 KB
templates/representatives/representative_detail.html
View file @
0b7c86eb
{% extends 'base.html' %}
{% load bootstrap3 %}
{% load i18n %}
{% load humanize %}
{% load memopol_tags %}
{% load representatives_recommendations_tags %}
{% load staticfiles %}
{%
block title %}{{ object.full_name }}{% endblock
%}
{%
with representative=object
%}
{% block content %}
<div
class=
"row"
>
<div
class=
"col-sm-3"
>
<img
src=
"{{ object.photo }}"
>
</div>
{% block title %}{{ representative.full_name }}{% endblock %}
<div
class=
"col-sm-9"
>
<h1
class=
"text-left"
>
{{ object.full_name }}
</h1>
{% block content %}
<div
class=
"row"
>
<div
class=
"col-sm-3"
>
<img
src=
"{{ representative.photo }}"
>
</div>
<div
class=
"col-sm-9"
>
<dl
class=
"dl-horizontal"
>
<dt>
{% trans "Score" %}
</dt>
<dd>
<span
class=
"badge"
data-toggle=
"tooltip"
data-placement=
"right"
title=
"{% trans "
Le
score
est
une
somme
de
points
attribués
suivant
si
le
MEP
vote
dans
notre
sens
(
positif
)
ou
non
(
négatif
)
multiplié
par
le
poids
(
importance
)
de
ce
vote.
"
%}"
>
{{ object.score.score }}
</span>
{{ object.score.score|score_arrow }}
</dd>
<h1
class=
"text-center"
>
{{ representative.full_name }}
</h1>
<div
class=
"col-sm-9"
>
<dl
class=
"dl-horizontal"
>
<dt>
{% trans "Score" %}
</dt>
<dd>
<span
class=
"badge"
data-toggle=
"tooltip"
data-placement=
"right"
title=
"{% trans "
Le
score
est
une
somme
de
points
attribués
suivant
si
le
MEP
vote
dans
notre
sens
(
positif
)
ou
non
(
négatif
)
multiplié
par
le
poids
(
importance
)
de
ce
vote.
"
%}"
>
{{ representative.score.score }}
</span>
{{ representative.score.score|score_arrow }}
</dd>
<dt>
{% trans "Country" %}
</dt>
<dd>
{{ representative.country|country_flag }}
</dd>
<dt>
{% trans "Country" %}
</dt>
<dd>
{{ object.country|country_flag }}
</dd>
<dt>
{% trans "Party" %}
</dt>
<dd>
{% with mandate=representative.main_mandate %}
<a
href=
"{{ mandate.group.get_absolute_url }}"
>
{% blocktrans with role=representative.main_mandate.role group_name=mandate.group.name %}
{{ role }} of {{ group_name }}{% endblocktrans %}
</a>
{% if mandate.group.abbreviation %}
({{ mandate.group.abbreviation }}){% endif %}
{% endwith %}
</dd>
<dt>
{% trans "Party" %}
</dt>
<dd>
{% with mandate=object.main_mandate %}
<a
href=
"{{ mandate.group.get_absolute_url }}"
>
{% blocktrans with role=object.main_mandate.role group_name=mandate.group.name %}
{{ role }} of {{ group_name }}{% endblocktrans %}
</a>
{% if mandate.group.abbreviation %}
({{ mandate.group.abbreviation }}){% endif %}
{% endwith %}
</dd>
<dt>
{% trans "Biography" %}
</dt>
<dd>
{% blocktrans with birth_place=representative.birth_place birth_date=representative.birth_date|naturalday:'d/m/Y' %}Born in {{ birth_place }} the {{ birth_date }}{% endblocktrans %} ({{ representative.get_gender_display }})
</dd>
<dt>
{% trans "Biography" %}
</dt>
<dd>
{% blocktrans with birth_place=object.birth_place birth_date=object.birth_date|naturalday:'d/m/Y' %}Born in {{ birth_place }} the {{ birth_date }}{% endblocktrans %} ({{ object.get_gender_display }})
</dd>
<dt>
{% trans "Links" %}
</dt>
<dd>
{% for site in representative.social_websites %}
<a
class=
"label label-primary"
href=
"{{ site.url }}"
target=
"_blank"
>
<img
class=
"social-icon"
src=
"{% static 'images' %}/social-{{ site.kind }}.png"
>
{% with kind=site.kind|capfirst %}
{% trans kind %}
{% endwith %}
</a>
{% endfor %}
{% for site in representative.chamber_websites %}
<a
class=
"label label-primary"
href=
"{{ site.url }}"
target=
"_blank"
>
{% bootstrap_icon "user" %}
{% trans "Parliament page" %}
</a>
{% endfor %}
{% for site in representative.other_websites %}
<a
class=
"label label-primary"
href=
"{{ site.url }}"
target=
"_blank"
>
{% bootstrap_icon "link" %}
{% trans "Website" %}
</a>
{% endfor %}
</dd>
{#
<dt>
More infos
</dt><dd><a><span
class=
"label label-primary"
><span
class=
"glyphicon glyphicon-grain"
></span>
Facebook
</span></a>
<a><span
class=
"label label-primary"
><span
class=
"glyphicon glyphicon-plane"
></span>
Twitter
</span></a>
<a><span
class=
"label label-primary"
><span
class=
"glyphicon glyphicon-tree-conifer"
></span>
Parliement
</span></a></dd>
#}
</dl>
{#
<dt>
More infos
</dt><dd><a><span
class=
"label label-primary"
><span
class=
"glyphicon glyphicon-grain"
></span>
Facebook
</span></a>
<a><span
class=
"label label-primary"
><span
class=
"glyphicon glyphicon-plane"
></span>
Twitter
</span></a>
<a><span
class=
"label label-primary"
><span
class=
"glyphicon glyphicon-tree-conifer"
></span>
Parliement
</span></a></dd>
#}
</dl>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<ul
class=
"nav nav-tabs nav-justified"
role=
"tablist"
>
<li
role=
"presentation"
{%
if
tab =
=
'
votes
'
%}
class=
"active"
{%
endif
%}
>
<a
href=
"{% url 'representative-votes' slug=
object
.slug %}"
role=
"tab"
>
<h3>
{% trans "Votes" %}
</h3>
</a>
</li>
<li
role=
"presentation"
{%
if
tab =
=
'
mandates
'
%}
class=
"active"
{%
endif
%}
>
<a
href=
"{% url 'representative-mandates' slug=
object
.slug %}"
role=
"tab"
>
<h3>
{% trans "Mandates" %}
</h3>
</a>
</li>
<li
role=
"presentation"
{%
if
tab =
=
'
positions
'
%}
class=
"active"
{%
endif
%}
>
<a
href=
"{% url 'representative-positions' slug=
object
.slug %}"
role=
"tab"
>
<h3>
{% trans "Public positions" %}
</h3>
</a>
</li>
</ul>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<ul
class=
"nav nav-tabs nav-justified"
role=
"tablist"
>
<li
role=
"presentation"
{%
if
tab =
=
'
votes
'
%}
class=
"active"
{%
endif
%}
>
<a
href=
"{% url 'representative-votes' slug=
representative
.slug %}"
role=
"tab"
>
<h3>
{% trans "Votes" %}
</h3>
</a>
</li>
<li
role=
"presentation"
{%
if
tab =
=
'
mandates
'
%}
class=
"active"
{%
endif
%}
>
<a
href=
"{% url 'representative-mandates' slug=
representative
.slug %}"
role=
"tab"
>
<h3>
{% trans "Mandates" %}
</h3>
</a>
</li>
<li
role=
"presentation"
{%
if
tab =
=
'
positions
'
%}
class=
"active"
{%
endif
%}
>
<a
href=
"{% url 'representative-positions' slug=
representative
.slug %}"
role=
"tab"
>
<h3>
{% trans "Public positions" %}
</h3>
</a>
</li>
</ul>
<div
class=
"tab-content"
>
{% block representative_content %}{% endblock %}
<div
class=
"tab-content"
>
{% block representative_content %}{% endblock %}
</div>
</div>
</div>
</div>
{% endblock %}
{% endblock %}
{% endwith %}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment