{# * Copyright (C) 2014, Champs Libres Cooperative SCRLFS, * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . #} {% extends "@ChillPerson/layout.html.twig" %} {% set activeRouteKey = 'chill_activity_activity_list' %} {% block title %}{{ 'Activity list' |trans }}{% endblock title %} {% block personcontent %}

{{ 'Activity list' |trans }}

{% if activities|length == 0 %}

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

{% else %} {% for activity in activities %} {% endfor %}
{{'Date' | trans }} {{'Duration Time' | trans }} {{'Reasons' | trans}} {{'Type' | trans}}  
{% if activity.date %}{{ activity.date|format_date('long', 'none') }}{% endif %} {{ activity.durationTime|date('H:i') }} {% if activity.remark is not empty %}
{{ activity.remark|slice(0, 250) }} {# sf4 check: if 'slice' could replace 'truncate' filter ? truncate come with twig-extensions, in conflict with twig 3 #}
{% endif %} {%- if activity.reasons is empty -%} {{ 'No reason associated'|trans }} {%- else -%} {% for r in activity.reasons %}{{ r|chill_entity_render_box }} {% endfor %} {%- endif -%}
{{ activity.type.name | localize_translatable_string }}
  • {% if is_granted('CHILL_ACTIVITY_UPDATE', activity) %}
  • {% endif %} {% if is_granted('CHILL_ACTIVITY_DELETE', activity) %}
  • {% endif %}
{% endif %} {% endblock %}