diff --git a/src/Bundle/ChillCalendarBundle/Resources/public/chill/scss/calendar-list.scss b/src/Bundle/ChillCalendarBundle/Resources/public/chill/scss/calendar-list.scss index 654d8c8c5..56f40c201 100644 --- a/src/Bundle/ChillCalendarBundle/Resources/public/chill/scss/calendar-list.scss +++ b/src/Bundle/ChillCalendarBundle/Resources/public/chill/scss/calendar-list.scss @@ -14,13 +14,23 @@ div.calendar-list { ul.calendar-list { display: inline-block; } + + & > a.calendar-list__global { + display: inline-block; + padding: 0.2rem; + min-width: 2rem; + border: 1px solid var(--bs-chill-blue); + border-radius: 0.25rem; + text-align: center; + } + } -.calendar-list__global { +/*.calendar-list__global { display: inline-block; padding: 0.2rem; min-width: 2rem; border: 1px solid var(--bs-chill-blue); border-radius: 0.25rem; text-align: center; -} +}*/ diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig index 417ff4e7b..db82df370 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Entity/person.html.twig @@ -14,6 +14,7 @@ * addAgeBadge bool * suffixText bool * address_multiline bool + * addNextCalendars bool * customButtons [ 'before' Twig\Markup, (injected with macro) 'replace' Twig\Markup, @@ -189,40 +190,6 @@ {% endfor %} {% endif %} - - {% 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 %}
@@ -249,3 +216,45 @@
{%- 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 0840cecb6..4a38abee2 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,6 +298,7 @@ 'addAltNames': true, 'addCenter': true, 'address_multiline': false, + 'addNextCalendars': true, 'customButtons': { 'after': _self.button_person_after(person), 'before': _self.button_person_before((person)) } }) }} diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php index f74aa9ec1..4fd43f2e8 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php @@ -46,6 +46,7 @@ class PersonRender implements PersonRenderInterface 'addDeath' => $options['addDeath'] ?? true, 'addAgeBadge' => $options['addAgeBadge'] ?? false, 'suffixText' => $options['suffixText'] ?? [], + 'addNextCalendars' => $options['addNextCalendars'] ?? false, ]; return