{% extends theme_base %}
{% load static %}

{% block extra-top-head %}
{{script|safe}}
<script src="{% static 'dataview.js' %}"></script>
{% endblock %}

{% block extra-body-class %}
{{ block.super }}
{% if global_context.form_slug %}
  {% if global_context.category_slug %}formdef-category-{{global_context.category_slug}}{% endif %}
  formdef-{{global_context.form_slug}}
{% endif %}
{% endblock %}

{% block user-info %}
  {% if session_user %}
  <span class="logged-in">
    {% if account_url %}<a href="{{ account_url }}">{% endif %}
    <span class="connected-user">{{session_user_display_name}}</span>{% if account_url %}</a>{% endif %}
    <a accesskey="o" class="logout" href="{{root_url}}logout">D&eacute;connexion</a>
  </span>
  {% else %}
    <span class="login"><a accesskey="2" href="{{root_url}}login/">Connexion</a> <span class="sep">/</span>
    <a class="registration" href="{{root_url}}register/">Inscription</a></span>
  {% endif %}
{% endblock %}

{% block banner %}
{% if category_description %}
<div class="banner category {{ category_slug }}">{{ category_description }}</div>
{% endif %}
{% endblock %}

{% block placeholder-content %}
  {% block content %}
    <div id="rub_service">
    {% if title %}<h2 style="background-image: url({{portal_url}}assets/wcs:form:picture:banner:eservices:{{form_slug}})">{{ title }}
        {% if global_context.form_var_commune %}<span class="commune"
            style="background-image: url({{portal_url}}assets/logo:{{ global_context.form_var_commune|slugify }})"
            ></span>{% endif %}
    </h2>{% endif %}
    {% block body %}
    {{ body|safe }}
    {% endblock %}
    </div>
  {% endblock %}
{% endblock %}
