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

{{ "Activity"|trans }}

{% if entity.date %}

{{ entity.date|format_date('short') }}

{% endif %}

{{ entity.type.name | localize_translatable_string }} {% if entity.emergency %} {{ 'Emergency'|trans|upper }} {% endif %}

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

{{ 'No social issues associated'|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 %} {{ 'No social actions associated'|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, 'render': 'bloc', 'badge_person': true } %}

{{ 'Activity data'|trans }}

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

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

{{ entity.location.address|chill_entity_render_box }}
{% else %} {{ 'No address given'|trans }} {% endif %}
{% endif %} {% if t.durationTimeVisible and is_granted('CHILL_ACTIVITY_SEE_DETAILS', entity) %}
{{ 'Duration Time'|trans }}
{% if entity.durationTime is not null %} {{ entity.durationTime|date('H:i') }} {% else %} {{ 'None'|trans|capitalize }} {% endif %}
{% endif %} {% if t.travelTimeVisible and is_granted('CHILL_ACTIVITY_SEE_DETAILS', entity) %}
{{ 'Travel time'|trans }}
{% if entity.travelTime is not null %} {{ entity.travelTime|date('H:i') }} {% else %} {{ 'None'|trans|capitalize }} {% endif %}
{% endif %} {% if t.commentVisible and is_granted('CHILL_ACTIVITY_SEE_DETAILS', entity) %}
{{ 'activity.comment'|trans }}
{%- if entity.comment.empty -%} {{ 'No comment associated'|trans }} {%- else -%} {{ entity.comment|chill_entity_render_box }} {%- endif -%}
{% endif %} {% if t.privateCommentVisible and is_granted('CHILL_ACTIVITY_SEE_DETAILS', entity) and entity.privateComment.hasCommentForUser(app.user) %} {% if t.privateCommentLabel is not empty %}
{{ t.privateCommentLabel }}
{% else %}
{{ 'Private comment'|trans }}
{% endif %}
{{ entity.privateComment.comments[userId] }}
{% endif %} {% if t.documentsVisible and is_granted('CHILL_ACTIVITY_SEE_DETAILS', entity) %}
{{ 'Documents'|trans }}
{% if entity.documents|length > 0 %}
    {% for d in entity.documents %}
  • {{ d.title }}{{ m.download_button(d) }}
  • {% endfor %}
{% else %} {{ 'Any document found'|trans }} {% endif %}
{% endif %} {% if t.attendeeVisible and is_granted('CHILL_ACTIVITY_SEE_DETAILS', entity) %}
{{ 'Attendee'|trans }}
{% if entity.attendee is not null %} {{ entity.attendee.name|localize_translatable_string }} {% else %} {{ 'None'|trans|capitalize }} {% endif %}
{% endif %}
{% set notifications = chill_list_notifications('Chill\\ActivityBundle\\Entity\\Activity', entity.id) %} {% if notifications is not empty %} {{ notifications|raw }} {% 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 %}