<!DOCTYPE html>
{% load menu_tags cms_tags sekizai_tags i18n portail_citoyen_tags static %}
<html>
  <head>
    <meta charset="UTF-8"><!-- ☭ -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="content-language" content="fr" />
    <title>Compte Citoyen :: Montpellier Méditerranée Métropole :: {% page_attribute "page_title" %}</title>
    <link rel="shortcut icon" href="{% static "themes/django-montpellier/favicon.png" %}">
    <link rel="stylesheet" type="text/css" href="{% static "themes/django-montpellier/style.css" %}">
    <link href='https://fonts.googleapis.com/css?family=Lato:400,700,700italic,400italic|Carme|Arvo' rel='stylesheet' type='text/css'>
    <script src="//d3nslu0hdya83q.cloudfront.net/dist/1.0/raven.min.js"></script>
    <script>
      Raven.config('{{ SENTRY_JS }}').install();
    </script>
    {% render_block "css" %}
    {% block extra_scripts %}
    {% endblock %}
    {% addtoblock "js" %}
    <script src="/static/cms/js/libs/jquery.min.js"></script>
    {% endaddtoblock %}
    {{ PIWIK_JS|safe }}
  </head>
  <body {% block bodyargs %}{% endblock %}>
    {% cms_toolbar %}
    <div id="page">
      <div id="header">
        <div id="top">
          {% if user.is_authenticated %}
            <a href="{{ site_agglo_montpellier_url }}/simplesamlphp/module.php/core/as_login.php?ReturnTo={{ site_agglo_montpellier_url }}&amp;AuthId=default-sp" accesskey="1"><img src="{% static "themes/django-montpellier/logo.png" %}"
              title="Montpellier agglomération" /></a>
          {% else %}
            <img src="{% static "themes/django-montpellier/logo.png" %}"
              title="Montpellier agglomération" />
          {% endif %}
          <div class="region-header">
            {% if user.is_authenticated %}
              <div id="toplinks">
                <span>
                  <a class="logout" href="{{ LOGOUT_URL }}">{% trans "Logout" %}</a>
                  {% user_in_group "Agglo::Téléservices::Admin" as is_eservice_admin %}
                  {% user_in_group_prefix "Agglo::Téléservices::BackOffice::" as is_eservice_backoffice_user %}
                  {% if is_eservice_admin %}
                  <a class="restricted" href="{{ wcs_url }}/admin/">Administration</a>
                  {% elif is_eservice_backoffice_user %}
                  <a class="restricted" href="{{ wcs_url }}/backoffice/">Back office</a>
                  {% endif %}
                </span>
              </div>
              <div id="username">{{ user.first_name }} {{ user.last_name }}</div>
            {% endif %}
          </div>
        </div>
        {% block messages %}
          {% if messages %}
            <div id="messages">
              <ul class="messages">
                  {% for message in messages %}
                  <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
                  {% endfor %}
              </ul>
            </div>
          {% endif %}
        {% endblock %}
      </div> <!-- header -->
      <div id="main-content-wrapper">
        <div id="agglolinks">

          {% if user.is_authenticated %}
              <a class="agglo-mon-agglo" href="{{ site_agglo_montpellier_url }}/simplesamlphp/module.php/core/as_login.php?ReturnTo={{ site_agglo_montpellier_url }}&amp;AuthId=default-sp">Ma métropole</a>
              <a class="agglo-connaitre" href="{{ site_agglo_montpellier_url }}/simplesamlphp/module.php/core/as_login.php?ReturnTo={{ site_agglo_montpellier_url }}/connaitre&amp;AuthId=default-sp">Connaître</a>
              <a class="agglo-vivre" href="{{ site_agglo_montpellier_url }}/simplesamlphp/module.php/core/as_login.php?ReturnTo={{ site_agglo_montpellier_url }}/vivre&amp;AuthId=default-sp">Vivre</a>
              <a class="agglo-entreprendre" href="{{ site_agglo_montpellier_url }}/simplesamlphp/module.php/core/as_login.php?ReturnTo={{ site_agglo_montpellier_url }}/entreprendre&amp;AuthId=default-sp">Entreprendre</a>
          {% else %}
              <a class="agglo-mon-agglo" href="{{ site_agglo_montpellier_url }}">Ma métropole</a>
              <a class="agglo-connaitre" href="{{ site_agglo_montpellier_url }}/connaitre">Connaître</a>
              <a class="agglo-vivre" href="{{ site_agglo_montpellier_url }}/vivre">Vivre</a>
              <a class="agglo-entreprendre" href="{{ site_agglo_montpellier_url }}/entreprendre">Entreprendre</a>
          {% endif %}
         </div>
        {% block title %}{% endblock %}
        {% block menu %}
        <div id="menu">
          <ul>{% show_menu_below_id "top-page" 0 1 100 100 "compte-agglo-montpellier/top-menu.html" %}</ul>
        </div>
        {% endblock %}
        <div id="main-content">
          <div id="content">
            {% block content %}
            {% endblock %}
          </div> <!-- #content -->
        </div> <!-- #main-content -->
      </div> <!-- #main-content-wrapper -->
      <div id="footer">
        <p id="legal">
          © Montpellier-agglomération 2013 — Réalisation&nbsp;:
          <a href="http://www.entrouvert.com">Entr'ouvert</a>
        </p>
        <ul id="footer-menu">
          {% if user.is_authenticated %}
            <li class="footer-menu-leaf">
              <a class="footer-menu-leaf-link" href="{{ site_agglo_montpellier_url }}/simplesamlphp/module.php/core/as_login.php?ReturnTo=/vivre/transport&amp;AuthId=default-sp">Je me déplace</a>
            </li>

            <li class="footer-menu-leaf">
              <a class="footer-menu-leaf-link" href="{{ site_agglo_montpellier_url }}/simplesamlphp/module.php/core/as_login.php?ReturnTo=/vivre/environnement&amp;AuthId=default-sp">Je préserve</a>
            </li>

            <li class="footer-menu-leaf">
              <a class="footer-menu-leaf-link" href="{{ site_agglo_montpellier_url }}/simplesamlphp/module.php/core/as_login.php?ReturnTo=/entreprendre&amp;AuthId=default-sp">Je travaille</a>
            </li>

            <li class="footer-menu-leaf">
              <a class="footer-menu-leaf-link" href="{{ site_agglo_montpellier_url }}/simplesamlphp/module.php/core/as_login.php?ReturnTo=/vivre/solidarité&amp;AuthId=default-sp">Je partage</a>
            </li>

            <li class="footer-menu-leaf">
              <a class="footer-menu-leaf-link" href="{{ site_agglo_montpellier_url }}/simplesamlphp/module.php/core/as_login.php?ReturnTo=/vivre/culture&amp;AuthId=default-sp">Je me cultive</a>
            </li>

            <li class="footer-menu-leaf">
              <a class="footer-menu-leaf-link" href="{{ site_agglo_montpellier_url }}/simplesamlphp/module.php/core/as_login.php?ReturnTo=/vivre/tourisme-traditions&amp;AuthId=default-sp">Je découvre</a>
            </li>

            <li class="footer-menu-leaf">
              <a class="footer-menu-leaf-link" href="{{ site_agglo_montpellier_url }}/simplesamlphp/module.php/core/as_login.php?ReturnTo=/vivre/sport&amp;AuthId=default-sp">Je m'oxygène</a>
            </li>

            <li class="footer-menu-leaf">
              <a class="footer-menu-leaf-link" href="{{ site_agglo_montpellier_url }}/simplesamlphp/module.php/core/as_login.php?ReturnTo=/connaître-compétences/logement&amp;AuthId=default-sp">Je me loge</a>
            </li>
          {% else %}
            <li class="footer-menu-leaf">
              <a class="footer-menu-leaf-link" href="{{ site_agglo_montpellier_url }}/vivre/transport">Je me déplace</a>
            </li>

            <li class="footer-menu-leaf">
              <a class="footer-menu-leaf-link" href="{{ site_agglo_montpellier_url }}/vivre/environnement">Je préserve</a>
            </li>

            <li class="footer-menu-leaf">
              <a class="footer-menu-leaf-link" href="{{ site_agglo_montpellier_url }}/entreprendre">Je travaille</a>
            </li>

            <li class="footer-menu-leaf">
              <a class="footer-menu-leaf-link" href="{{ site_agglo_montpellier_url }}/vivre/solidarité">Je partage</a>
            </li>

            <li class="footer-menu-leaf">
              <a class="footer-menu-leaf-link" href="{{ site_agglo_montpellier_url }}/vivre/culture">Je me cultive</a>
            </li>

            <li class="footer-menu-leaf">
              <a class="footer-menu-leaf-link" href="{{ site_agglo_montpellier_url }}/vivre/tourisme-traditions">Je découvre</a>
            </li>

            <li class="footer-menu-leaf">
              <a class="footer-menu-leaf-link" href="{{ site_agglo_montpellier_url }}/vivre/sport">Je m'oxygène</a>
            </li>

            <li class="footer-menu-leaf">
              <a class="footer-menu-leaf-link" href="{{ site_agglo_montpellier_url }}/connaître-compétences/logement">Je me loge</a>
            </li>
          {% endif %}

        </ul>
      </div>
    </div>
    {% render_block "js" %}
    {% if messages %}
    <script>
      jQuery('#messages').delay(3000*(1+{{ messages|length }})).fadeOut('slow');
    </script>
    {% endif %}
  </body>
</html>
