{% extends "base.html" %}
{% load i18n %}

{% block meta_title %}Profil de {{profile}}{% endblock %}



{% block document %}

<div id="title" class="grid_12 grid">
{% block title %}<h3>Profil de {{profile}}</h3>{% endblock %}
</div>


{% block content %}
<div id="content">
    <div class="grid_6 grid">

        <div id="hcard_{{profile.id}}" class="vcard">

        <div class="adr">
            {% if profile.adresse %}<div class="street-address">{{profile.adresse}}</div>{% endif %}
            {% if profile.code_postal %}<span class="postal-code">{{profile.code_postal}}</span>&nbsp;{% endif %}
            {% if profile.ville %}<span class="locality">{{profile.ville}}</span>&nbsp;{% endif %}
            {% if profile.pays %}<span class="country-name">{{profile.pays}}</span>&nbsp;{% endif %}
        </div>


        {% if profile.email %}<a class="email" href="mailto:{{profile.email}}">{{ profile.email }}</a><br/>{% endif %}
        {% if profile.telephone_fixe %}<div class="tel"><span class="value">{{profile.telephone_fixe}}</span> [<abbr class="type" title="home">fixe</abbr>]</div>{% endif %}
        {% if profile.telephone_portable %}<div class="tel"><span class="value">{{profile.telephone_portable}}</span> [<abbr class="type" title="home">portable</abbr>]</div>{% endif %}


        {% if profile.user.username == request.user.username %}
            <div id="mod_profil_link"><a href="/profil/edit/">Modifier votre profil</a></div> 
        {% endif %}


    </div>
    </div>  
    
    <div class="grid_6 grid">

        <h4>Engagements</h4>
        {% if profile.engagements %}
        <ul class="engagements">
            {% for engagement in profile.engagements.all %}
            <li>dans <a href="{{engagement.initiative.get_absolute_url}}">{{engagement.initiative}}</a>,
                en tant que <a href="{{engagement.role.get_absolute_url}}" class="role">{{engagement.role}}</a></li>
            {% endfor %}
        </ul>
        {% endif %}
    
    </div>    

{% endblock %}
{% endblock %}

{% block footer%}        
<a href="{{D2RQ_ROOT}}page/person/{{profile.id}}">
    <img border="0" align="left" src="{{STATIC_URL}}img/semweb.png"></a>
    <br/>
{% endblock %}