+ {% for complementary_info in handle_event('AppendCardNote', { 'note': note, 'request': app.request }) %}
+ {% set actor_count = complementary_info['actors'] | length %}
+ {% set counter = 0 %}
+ {% for complementary_info_actor in complementary_info['actors'] %}
+
+ {% if app.user is not null %}
+ {% if complementary_info_actor is defined and complementary_info_actor.getNickname() != app.user.nickname %}
+ {{ complementary_info_actor.getNickname() }}{% if actor_count > 1 and counter < actor_count - 2 %}{{ ', ' | trans }}{% endif %}
+ {% if counter == actor_count - 2 %}
+ {{ ' and ' | trans }}
+ {% endif %}
+ {% set counter = counter + 1 %}
{% endif %}
- {% set counter = counter + 1 %}
- {% endif %}
- {% else %}
- {% if complementary_info_actor is defined %}
- {{ complementary_info_actor.getNickname() }}{% if actor_count > 1 and counter < actor_count - 2 %}{{ ', ' | trans }}{% endif %}
- {% if counter == actor_count - 2 %}
- {{ ' and ' | trans }}
+ {% else %}
+ {% if complementary_info_actor is defined %}
+ {{ complementary_info_actor.getNickname() }}{% if actor_count > 1 and counter < actor_count - 2 %}{{ ', ' | trans }}{% endif %}
+ {% if counter == actor_count - 2 %}
+ {{ ' and ' | trans }}
+ {% endif %}
+ {% set counter = counter + 1 %}
{% endif %}
- {% set counter = counter + 1 %}
{% endif %}
- {% endif %}
+ {% endfor %}
+ {% if complementary_info['action'] is defined and not null and counter > 0 %}
+ {% if counter > 1 %}
+ {{ ' have ' | trans }}
+ {% else %}
+ {{ ' has ' | trans }}
+ {% endif %}
+ {{ complementary_info['action'] ~ ' this note' | trans }}
+ {% endif %}
+
{% endfor %}
- {% if complementary_info['action'] is defined and not null and counter > 0 %}
- {% if counter > 1 %}
- {{ ' have ' | trans }}
- {% else %}
- {{ ' has ' | trans }}
- {% endif %}
- {{ complementary_info['action'] ~ ' this note' | trans }}
- {% endif %}
-
- {% endfor %}
-{% endblock note_complementary_info %}
\ No newline at end of file
+
+ {{ block('note_actions', 'cards/blocks/note.html.twig') }}
+