{% if activities|length == 0 %}

{{ "There isn't any activities."|trans }}

{% else %}
{% for activity in activities %} {% set t = activity.type %}
{% if activity.date %}

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

{% endif %}

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

{% if activity.location and t.locationVisible %}

{{ 'location'|trans }}

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

{% endif %} {% if activity.sentReceived is not empty and t.sentReceivedVisible %}

{{ 'Sent received'|trans }}

{{ activity.sentReceived|capitalize|trans }}

{% endif %} {% if activity.user and t.userVisible %}

{{ 'Referrer'|trans }}

{{ activity.user.usernameCanonical|chill_entity_render_string|capitalize }}

{% endif %}
{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with { 'context': context, 'with_display': 'wrap-list', 'entity': activity, 'badge_person': true } %}
{%- if activity.reasons is not empty and t.reasonsVisible -%}

{{ 'Reasons'|trans }}

{% for r in activity.reasons %}

{{ r|chill_entity_render_box }}

{% endfor %}
{% endif %} {%- if activity.socialIssues is not empty and t.socialIssuesVisible -%}

{{ 'Social issues'|trans }}

{% for r in activity.socialIssues %} {% endfor %}
{% endif %} {%- if activity.socialActions is not empty and t.socialActionsVisible -%}

{{ 'Social actions'|trans }}

{% for r in activity.socialActions %} {% endfor %}
{% endif %} {% if activity.comment.comment is not empty and is_granted('CHILL_ACTIVITY_SEE_DETAILS', activity) %}

{{ 'Comment'|trans }}

{{ activity.comment|chill_entity_render_box({ 'disable_markdown': false, 'limit_lines': 3, 'metadata': false }) }}
{% endif %} {# Only if ACL SEE_DETAILS AND/OR only on template SHOW ?? durationTime travelTime comment documents attendee #}
    {% if context == 'person' and activity.accompanyingPeriod is not empty %} {# Disable person_id in following links, for redirect to accompanyingCourse context #} {% set person_id = null %} {% set accompanying_course_id = activity.accompanyingPeriod.id %}
  • {{ 'Period number %number%'|trans({'%number%': accompanying_course_id}) }}
  • {% endif %}
  • {% if no_action is not defined or no_action == false %} {% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %}
  • {% endif %} {% if is_granted('CHILL_ACTIVITY_DELETE', activity) %}
  • {% endif %} {% endif %}
{% endfor %}
{% endif %}