Commit 0b7c86eb authored by Nicolas Joyard's avatar Nicolas Joyard

Add website links

parent 71b8a11e
......@@ -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

1.77 KB | W: | H:

static/images/social-facebook.png

1.71 KB | W: | H:

static/images/facebook.png
static/images/social-facebook.png
static/images/facebook.png
static/images/social-facebook.png
  • 2-up
  • Swipe
  • Onion skin
{% 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>&nbsp;&nbsp;{{ 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>&nbsp;&nbsp;{{ 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 %}&nbsp;({{ 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 %}&nbsp;({{ 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 %}
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