{%- set t = entity.type -%} {%- import "@ChillDocStore/Macro/macro.html.twig" as m -%}

{{ "Activity"|trans }} {%- if t.emergencyVisible and entity.emergency -%} {{- 'Emergency'|trans -}} {%- endif -%}

{{ 'by'|trans|capitalize }}
{{ entity.user }}
{{ 'Type'|trans }}
{{ entity.type.name | localize_translatable_string }}
{%- if entity.scope -%}
{{ 'Scope'|trans }}
{{ entity.scope.name|localize_translatable_string }}
{% endif %} {% if t.socialIssuesVisible %}
{{ 'Social issues'|trans }}
{% if entity.socialIssues|length == 0 %}

{{ 'Any social issues'|trans }}

{% else %} {% for si in entity.socialIssues %}{{ si|chill_entity_render_box }}{% endfor %} {% endif %}
{% endif %} {% if t.socialActionsVisible %}
{{ 'Social actions'|trans }}
{% if entity.socialActions|length == 0 %}

{{ 'Any social actions'|trans }}

{% else %} {% for sa in entity.socialActions %}{{ sa|chill_entity_render_box }}{% endfor %} {% endif %}
{% endif %} {% if t.reasonsVisible %}
{{ 'Reasons'|trans }}
{%- if entity.reasons is empty -%}
{{ 'No reason associated'|trans }}
{%- else -%}
{% for r in entity.reasons %}{{ r|chill_entity_render_box }} {% endfor %}
{%- endif -%} {% endif %}

{{ 'Concerned groups'|trans }}

{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': context, 'with_display': 'bloc' } %}

{{ 'Activity data'|trans }}

{{ 'Date'|trans }}
{{ entity.date|format_date('long') }}
{% if t.locationVisible %}
{{ 'Activity location'|trans }}
{% if entity.location is not null %}

{{ entity.location.locationType.title|localize_translatable_string }} {{ entity.location.name }}

{{ entity.location.address|chill_entity_render_box }} {% else %} {{ 'No address given'|trans }} {% endif %}
{% endif %} {% if t.durationTimeVisible %}
{{ 'Duration Time'|trans }}
{% if entity.durationTime is not null %} {{ entity.durationTime|date('H:i') }} {% else %} {{ 'None'|trans|capitalize }} {% endif %}
{% endif %} {% if t.travelTimeVisible %}
{{ 'Travel time'|trans }}
{% if entity.travelTime is not null %} {{ entity.travelTime|date('H:i') }} {% else %} {{ 'None'|trans|capitalize }} {% endif %}
{% endif %} {% if t.commentVisible %}
{{ 'activity.comment'|trans }}
{%- if entity.comment.empty -%}
{{ 'No comment associated'|trans }}
{%- else -%}
{{ entity.comment|chill_entity_render_box }}
{%- endif -%} {% endif %} {% if t.documentsVisible and entity.documents|length > 0 %}
{{ 'Documents'|trans }}
{% endif %} {% if t.attendeeVisible %}
{{ 'Attendee'|trans }}
{% if entity.attendee is not null %}{% if entity.attendee %}{{ 'present'|trans|capitalize }} {% else %} {{ 'not present'|trans|capitalize }}{% endif %}{% else %}{{ 'None'|trans|capitalize }}{% endif %}
{% endif %}
{% set person_id = null %} {% if person %} {% set person_id = person.id %} {% endif %} {% set accompanying_course_id = null %} {% if accompanyingCourse %} {% set accompanying_course_id = accompanyingCourse.id %} {% endif %}