{% macro recordAction(activity, context = null, person_id = null, accompanying_course_id = null) %} {% if no_action is not defined or no_action == false %}
  • {{ 'notification.Notify'|trans }}
  • {% endif %} {% 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 %} {% endmacro %}
    {% if activities|length == 0 %}

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

    {% else %}
    {% for activity in activities %} {% include 'ChillActivityBundle:Activity:_list_item.html.twig' with { 'context': context, 'recordAction': _self.recordAction(activity, context, person_id, accompanying_course_id) } %} {% endfor %}
    {% endif %}