diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_macros.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_macros.html.twig index 10a0f94c7..b04e9483a 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_macros.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_macros.html.twig @@ -1,7 +1,17 @@ -{% macro metadata(w) %} - {% set notif_counter = chill_count_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', w.id) %} - {% if notif_counter.total > 0 %} - {{ chill_counter_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', w.id) }} +{% macro metadata(w, include_notif_counter = true) %} + {% if include_notif_counter == true %} + {% set more = [] %} + {% for e in w.accompanyingPeriodWorkEvaluations %} + {% for d in e.documents %} + {% set more = more|merge([{'relatedEntityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument', 'relatedEntityId': d.id}]) %} + {% endfor %} + {% endfor %} + + {% set notif_counter = chill_count_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', w.id, more) %} + + {% if notif_counter.total > 0 %} + {{ chill_counter_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', w.id, more) }} + {% endif %} {% endif %} {% import '@ChillPerson/Macro/updatedBy.html.twig' as macro %} {{ macro.updatedBy(w) }} @@ -20,4 +30,4 @@ {% endfor %} {% endfor %} {{ chill_entity_workflow_list('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', w.id, [], suppEvaluations) }} -{% endmacro %} \ No newline at end of file +{% endmacro %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/show.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/show.html.twig index d32c1b700..438a6fb7f 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/show.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/show.html.twig @@ -27,7 +27,20 @@ 'displayContent': 'long', 'itemBlocClass': 'uniq extended', } %} -