{% if app.session.get('_application') == 0 %} {% set extendedTemplate = '@AdminLTE/layout/mesodd-layout.html.twig' %} {% endif %} {% if app.session.get('_application') == 1 %} {% set extendedTemplate = '@AdminLTE/layout/suiodd-layout.html.twig' %} {% endif %} {% if app.session.get('_application') == 2 %} {% set extendedTemplate = '@AdminLTE/layout/cfgodd-layout.html.twig' %} {% endif %} {% extends extendedTemplate %} {% block page_title %}{% trans %}direction.title{% endtrans %}{% endblock %} {% block page_content %} {% if is_granted('ROLE_MANAGER') or is_granted('ROLE_DDD') %}
{{ form_start(form) }}
{% if is_granted('ROLE_MANAGER') %}
{{ form_widget(form.type) }}
{{ form_widget(form.entite) }}
{% else %}
{{ form_widget(form.entite) }}
{% endif %}
{{ form_end(form) }}
{% else %}
{% trans %}direction.add{% endtrans %}
{% endif %} {% if entite %} {% embed '@AdminLTE/Widgets/box-widget.html.twig' %} {% block box_body %} {% for direction in directions %} {% if direction.ministry %} {% else %} {% endif %} {% endfor %}
{% trans %}basics.code{% endtrans %} {% trans %}basics.name{% endtrans %} {% trans %}basics.year{% endtrans %} {% trans %}basics.uploadkey{% endtrans %}
{{ direction.code }} {{ direction.name }} {{ direction.years ? max(direction.years) : null }}M{{ "%02d"|format(direction.ministry.id) }}-D{{ "%05d"|format(direction.id) }}C{{ "%02d"|format(direction.commune.id) }}-D{{ "%05d"|format(direction.id) }}
{% trans %}basics.update{% endtrans %}
{% endblock %} {% endembed %} {% else %} {% endif %} {% endblock %} {% block javascripts %} {% endblock %} {% block stylesheets %} {% endblock %}