diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig index db82df370..140cb1995 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig @@ -14,7 +14,6 @@ * addAgeBadge bool * suffixText bool * address_multiline bool - * addNextCalendars bool * customButtons [ 'before' Twig\Markup, (injected with macro) 'replace' Twig\Markup, @@ -215,46 +214,3 @@ {%- endif -%} - -{%- if options['addNextCalendars'] -%} - {% set calendars = [] %} - {% for c in person.getNextCalendarsForPerson(10) %} - {% if is_granted('CHILL_CALENDAR_CALENDAR_SEE', c) %} - {% set calendars = calendars|merge([c]) %} - {% endif %} - {% endfor %} - - {% if calendars|length > 0 %} -
-
-
-

{{ 'chill_calendar.Next calendars'|trans }}

-
-
-
- - {% if is_granted('CHILL_CALENDAR_CALENDAR_SEE', person) %} - - {% endif %} -
-
-
-
- {% endif %} -{% endif %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig index 4a38abee2..cf7fb1466 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig @@ -298,10 +298,50 @@ 'addAltNames': true, 'addCenter': true, 'address_multiline': false, - 'addNextCalendars': true, 'customButtons': { 'after': _self.button_person_after(person), 'before': _self.button_person_before((person)) } }) }} + {% set calendars = [] %} + {% for c in person.getNextCalendarsForPerson(10) %} + {% if is_granted('CHILL_CALENDAR_CALENDAR_SEE', c) %} + {% set calendars = calendars|merge([c]) %} + {% endif %} + {% endfor %} + + {% if calendars|length > 0 %} +
+
+
+

{{ 'chill_calendar.Next calendars'|trans }}

+
+
+
+ + {% if is_granted('CHILL_CALENDAR_CALENDAR_SEE', person) %} + + {% endif %} +
+
+
+
+ {% endif %} + {#- 'acps' is for AcCompanyingPeriodS #} {%- set acps = [] %} {%- set acpsClosed = [] %} diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php index 4fd43f2e8..f74aa9ec1 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php @@ -46,7 +46,6 @@ class PersonRender implements PersonRenderInterface 'addDeath' => $options['addDeath'] ?? true, 'addAgeBadge' => $options['addAgeBadge'] ?? false, 'suffixText' => $options['suffixText'] ?? [], - 'addNextCalendars' => $options['addNextCalendars'] ?? false, ]; return