<p><strong>{% trans 'Email' %} :</strong> {{ person_email }}</p>
- {% if person.activities.all|length > 0 %}
- <h2 class="dotted">{% trans 'Activities' %}</h2>
+ {% with person.activities.all as activities %}
+ {% if activities %}
+ {# <h2 class="dotted">{% trans 'Activities' %}</h2>#}
<ul class="unstyled-list">
- {% for activity in person.activities.all %}
+ {% with activities.0 as activity %}
<li class="mb1">
- {% comment %}
- {% if activity.function %}
- <strong>{% trans 'Function'%} : </strong>{{ activity.function }}<br>
- {% endif %}
- {% if activity.status %}
- <strong>{% trans 'Status'%} : </strong>{{ activity.status }}<br>
- {% endif %}
- {% endcomment %}
{% with activity.teams.all as teams %}
+ {% with activity.organizations.all|is_not_host as organizations %}
+ {% with activity.employers.all|is_not_host as employers %}
{% if teams %}
<strong>{% trans 'Team' %} : </strong>
{% for team in teams %}
- <a href="{% url "page" team.pages.all.0 %}">{{ team.name }}</a>{% if not forloop.last %}, {% endif %}
+ <a href="{% url "page" team.pages.all.0 %}">{{ team.name }}</a>
+ {% if organizations %}({% for organization in organizations %}{{ organization.name }}{% if not forloop.last %}, {% endif %}{% endfor %})
+ {% elif employers %}({% for employer in employers %}{{ employer.name }}{% if not forloop.last %}, {% endif %}{% endfor %}){% endif %}
+ <br />
{% endfor %}
- <br />
- {% endif %}
- {% endwith %}
- {% with activity.organizations.all as organizations %}
- {% with activity.employers.all as employers %}
- {% if organizations %}
- <strong>{% trans 'Organization' %} : </strong>
- {% for organization in organizations %}
- {{ organization.name }}{% if not forloop.last %}, {% endif %}
- {% endfor %}
- <br />
- {% elif employers %}
- <strong>{% trans 'Organization' %} : </strong>
- {% for employer in employers %}
- {{ employer.name }}{% if not forloop.last %}, {% endif %}
- {% endfor %}
- <br />
{% endif %}
+ {% endwith %}
{% endwith %}
{% endwith %}
- {% if activity.date_from or activity.date_to %}
- {% if not activity.date_from and not activity.date_to|date_year_higher_than:10 %}
- <strong>{% trans 'Period' %}</strong> : {% trans 'to' %} {{ activity.date_to }}<br>
- {% elif not activity.date_to %}
- <strong>{% trans 'Period'%}</strong> : {% trans 'from' %} {{ activity.date_from }}<br>
- {% else %}
- <strong>{% trans 'Period'%}</strong> : {% trans 'from' %} {{ activity.date_from }} {% if not activity.date_to|date_year_higher_than:10 %}{% trans 'to' %} {{ activity.date_to }}{% endif %}<br>
- {% endif %}
- {% endif %}
</li>
- {% endfor %}
+ {% endwith %}
</ul>
- {% endif %}
+ {% endif %}
+ {% endwith %}
{% endblock %}
{% block page_sidebar %}
{% block page_link %}
{% with person.links.all as links %}
- {% if links or person_email %}
+ {% if links %}
<h2 class="dotted">{% trans 'Links' %}</h2>
{% include 'core/inc/link.html' %}
{% endif %}
--- /dev/null
+{% extends "pages/page.html" %}
+{% load mezzanine_tags keyword_tags i18n organization_tags pages_tags %}
+
+{% block meta_title %}{{ person.meta_title }}{% endblock %}
+
+{% block meta_keywords %}{% metablock %}
+{% keywords_for person as keywords %}
+{% for keyword in keywords %}
+ {% if not forloop.first %}, {% endif %}
+ {{ keyword }}
+{% endfor %}
+{% endmetablock %}{% endblock %}
+
+{% block page_class %}
+ person
+{% endblock %}
+
+{% block breadcrumb_menu %}
+ {{ block.super }}
+ <li class="breadcrumb__item active">{{ person }}</li>
+{% endblock %}
+
+{% block page_title %}
+ {% editable person.title %}
+ <h1 class="dotted">{{ person.title }}</h1>
+ {% endeditable %}
+{% endblock %}
+
+{% block page_content %}
+ {% editable person.bio %}
+ {{ person.bio|richtext_filters|safe }}
+ {% endeditable %}
+
+ <p><strong>{% trans 'Email' %} :</strong> {{ person_email }}</p>
+
+ {% if person.activities.all|length > 0 %}
+ <h2 class="dotted">{% trans 'Activities' %}</h2>
+ <ul class="unstyled-list">
+ {% for activity in person.activities.all %}
+ <li class="mb1">
+ {% comment %}
+ {% if activity.function %}
+ <strong>{% trans 'Function'%} : </strong>{{ activity.function }}<br>
+ {% endif %}
+ {% if activity.status %}
+ <strong>{% trans 'Status'%} : </strong>{{ activity.status }}<br>
+ {% endif %}
+ {% endcomment %}
+ {% with activity.teams.all as teams %}
+ {% if teams %}
+ <strong>{% trans 'Team' %} : </strong>
+ {% for team in teams %}
+ <a href="{% url "page" team.pages.all.0 %}">{{ team.name }}</a>{% if not forloop.last %}, {% endif %}
+ {% endfor %}
+ <br />
+ {% endif %}
+ {% endwith %}
+ {% with activity.organizations.all as organizations %}
+ {% with activity.employers.all as employers %}
+ {% if organizations %}
+ <strong>{% trans 'Organization' %} : </strong>
+ {% for organization in organizations %}
+ {{ organization.name }}{% if not forloop.last %}, {% endif %}
+ {% endfor %}
+ <br />
+ {% elif employers %}
+ <strong>{% trans 'Organization' %} : </strong>
+ {% for employer in employers %}
+ {{ employer.name }}{% if not forloop.last %}, {% endif %}
+ {% endfor %}
+ <br />
+ {% endif %}
+ {% endwith %}
+ {% endwith %}
+ {% if activity.date_from or activity.date_to %}
+ {% if not activity.date_from and not activity.date_to|date_year_higher_than:10 %}
+ <strong>{% trans 'Period' %}</strong> : {% trans 'to' %} {{ activity.date_to }}<br>
+ {% elif not activity.date_to %}
+ <strong>{% trans 'Period'%}</strong> : {% trans 'from' %} {{ activity.date_from }}<br>
+ {% else %}
+ <strong>{% trans 'Period'%}</strong> : {% trans 'from' %} {{ activity.date_from }} {% if not activity.date_to|date_year_higher_than:10 %}{% trans 'to' %} {{ activity.date_to }}{% endif %}<br>
+ {% endif %}
+ {% endif %}
+ </li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+{% endblock %}
+
+{% block page_sidebar %}
+ {% if person.images.all %}
+ {% with person.images.all|get_type:'page_featured' as images %}
+ {% if images.first %}
+ <figure class="person-list-box__image">
+ <img src="{{ MEDIA_URL }}{% thumbnail images.first 135 135 top=0.5 %}" alt="person"/>
+ </figure>
+ {% endif %}
+ {% endwith %}
+ {% endif%}
+{% endblock %}
+
+{% block page_link %}
+ {% with person.links.all as links %}
+ {% if links or person_email %}
+ <h2 class="dotted">{% trans 'Links' %}</h2>
+ {% include 'core/inc/link.html' %}
+ {% endif %}
+ {% endwith %}
+{% endblock %}