{% 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 %} {# SEULEMENT SI DÉTAILLÉ {% if activity.comment.comment is not empty %}

{{ 'Comment'|trans }}

{{ activity.comment|chill_entity_render_box({ 'disable_markdown': false, 'limit_lines': 3, 'metadata': false }) }}
{% endif %} #}
{% endfor %}
{% endif %}