{% extends 'admin/base.html.twig' %} {% block meta_title %} Signalement registre {{registre.registreType | upper}} {% endblock %} {% block top_title %} Registre {{registre.registreType | upper}} {% endblock %} {% block content %}
{##################### ENTETE AUTEUR ############################################}
{#--------- Titre -----------------#}

{% if registreType == "sst" %} Registre de Santé et de Sécurité au Travail {% elseif registreType == "ami" %} Registre des Actes d'Agressions, de menaces et d'incivilités {% else %} Signalement d'un danger grave et imminent {% endif %}

{#--------- Boutons actions -----------------#}
Retour Imprimer {% if is_granted('CHANGE_STATE_OWN', registre) or is_granted('CHANGE_STATE_ORGANIZATION', registre) %} État {% endif %} {% if is_granted('TRANSFER_OWN', registre) or is_granted('TRANSFER_ORGANIZATION', registre) or is_granted('TRANSFER_ALL', registre) %} Transférer {% endif %}
{# ############## MODAL CHANGER ETAT############### #} {# ################################################# #} {# ############## MODAL CHANGER ORGANISATION ############### #} {# ################################################# #}

Signalement N° {{registre.number}}

Créé le : {{registre.createdAt| date("d/m/Y à H:i")}}
{% if app.user == registre.author.username %}
{# #}
{% else %}
{{registre.status}}
{% endif %}
Auteur : {{registre.author.firstname}} {{registre.author.lastname}} - {{ registre.author.username ?? 'Anonyme' }}
Organisation : {{registre.organization.name}} {# {% if registre.author.groups %} {% for group in registre.author.groups %} , {{ group}} {% endfor %} {% endif %} #}
{% if registre.oldOrganizationId %}
Signalement transféré depuis : {{registre.author.organization.name}}
{% endif %}
Les champs marqués avec un * sont obligatoires
{##################### EDIT DESCRIPTION DU SIGNALEMENT ##########################} {% if is_granted('EDIT_OWN', registre) %}
{{ include('admin/registre/_form.html.twig') }}
{% else %} {##################### SHOW QUI EST CONCERNE ET LES FAITS #######################}

  • L'auteur : {% if registre.concernMyself %}Oui.{% else %}Non.{% endif %}
  • Tout le monde : {% if registre.concernAll %}Oui.{% else %}Non.{% endif %}
  • Ce(s) utilisateur(s) : {# {% if registre.concernUsers %} {% for concernUser in registre.concernUsers %} {{concernUser}} ; {% endfor %} {% else %} N/A. {% endif %} #}
  • Ce(s) services(s) : {# {% if registre.concernGroups %} {% for concernGroup in registre.concernGroups %} {{concernGroup}} {% endfor %} {% else %} N/A. {% endif %} #}
{##################### SHOW DESCRIPTION DU SIGNALEMENT ###########################}

Date : {{registre.dateIncident | date('d/m/Y') }}
Lieu : {{registre.lieuIncident}}
{% if registre.registreType == 'ami' %}
{{registre.typeAgression}}
{% endif %}
{% if registre.registreType == 'ami' %}
Les témoins : {{registre.temoins}}.
{% endif %}
Objet :
{{registre.title}}
Détails :
{{registre.content | raw()}}
{% endif %} {##################### SECTION lISTE DES FICHIERS (POUR LES VUE SHOW ET EDIT ###########################}
Pièces jointes
{% if filesList is not empty %}
{% for file in filesList %}
{{ file.originalFilename}}.{{file.mimeType}}
3.2 MB
{% if app.user == file.author.username and delete_function.registre_attachements %}
{% endif %}
{% endfor %}
{% else %} {% endif %}
{##################### EDIT SUITES EVENTUELLES ####################################} {# {% if is_granted('VALIDATE_ORGANIZATION', registre)%} {% include "admin/registre/_form_autres_suites_eventuelles.html.twig" %} {% endif %} #} {##################### SHOW/CREATE COMMENTS START ##################################} {#
Annotations - Observations
{% for comment in comments %}
{{comment.author.firstname}} {{comment.author.lastname}} - {{comment.author}} - {{comment.author.organization.name}} - {{comment.author.groups|join}} - Date : {% if comment.createdAt %} {{ comment.createdAt|date("d/m/Y à h:m")}} {% endif %}

{{comment.content}}

{% if commentFiles is defined %} {% for commentFile in commentFiles[comment.id] %}
{{ commentFile.originalFilename}}.{{commentFile.mimeType}} (3.2 MB) {% if app.user == commentFile.author.username %}
{% endif %}
{% endfor %} {% endif %}
{% if app.user == comment.author.username %}
{% endif %}
{% endfor %}
{{ form_start(commentForm, {'action': path('admin_registre_add_comment', {'id' : registre.id})})}}
{{ form_widget(commentForm.content)}}
{{ form_row(commentForm.entityType, {'attr': {'value': 'registre' }})}}
{{ form_row(commentForm.entityId, {'attr': {'value': registre.id }})}}
{{ form_row(commentForm.files)}}
{{ form_end(commentForm, {'render_rest' : true})}}
#}
{% endblock %} {% block javascript %} {% endblock %}