{% extends 'base.html.twig' %} {% set menu = 'resources' %} {% block body %} {% include '_partials/back_button.html.twig' with { url: path('user_index'), text: "users.back"|trans } %}

{{ "calendars.for"|trans({'who': principal.displayName}) }} + {{ "calendars.new"|trans }}

{% for compoundObject in calendars %} {% set calendar = compoundObject.entity %} {% set davUri = compoundObject.uri %}
{{ calendar.displayName }} {% if calendar.access == constant('\\App\\Entity\\CalendarInstance::ACCESS_PUBLIC') %} {{ ('calendar.share_access.' ~ calendar.access)|trans }} {% endif %}  
{% if not calendar.isPublic() %} {% endif %} ✎ {{ "edit"|trans }} ⚠ {{ "delete"|trans }}

{{ calendar.description }}

{% if calendar.calendar.components|split(',')|length > 0 %} {% if constant('\\App\\Entity\\Calendar::COMPONENT_EVENTS') in calendar.calendar.components %}{{ "calendars.component.events"|trans }}{% endif %} {% if constant('\\App\\Entity\\Calendar::COMPONENT_NOTES') in calendar.calendar.components %}{{ "calendars.component.notes"|trans }}{% endif %} {% if constant('\\App\\Entity\\Calendar::COMPONENT_TODOS') in calendar.calendar.components %}{{ "calendars.component.todos"|trans }}{% endif %} {% endif %} — {{ "calendars.entries"|trans({'%count%': calendar.calendar.objects|length}) }}
{% if not calendar.isPublic() %} {% endif %} ✎ {{ "edit"|trans }} ⚠ {{ "delete"|trans }}
{% endfor %}
{% if shared|length > 0 %}

{{ "calendars.shared.with"|trans({'who': principal.displayName}) }}

{% for compoundObject in shared %} {% set calendar = compoundObject.entity %} {% set davUri = compoundObject.uri %}
{{ calendar.displayName }} {% if calendar.access == constant('\\App\\Entity\\CalendarInstance::ACCESS_READWRITE') %} {{ ('calendar.share_access.' ~ calendar.access)|trans }} {% else %} {{ ('calendar.share_access.' ~ calendar.access)|trans }} {% endif %}  

{{ calendar.description }}

{% if calendar.calendar.components|split(',')|length > 0 %} {% if constant('\\App\\Entity\\Calendar::COMPONENT_EVENTS') in calendar.calendar.components %}{{ "calendars.component.events"|trans }}{% endif %} {% if constant('\\App\\Entity\\Calendar::COMPONENT_NOTES') in calendar.calendar.components %}{{ "calendars.component.notes"|trans }}{% endif %} {% if constant('\\App\\Entity\\Calendar::COMPONENT_TODOS') in calendar.calendar.components %}{{ "calendars.component.todos"|trans }}{% endif %} {% endif %} — {{ "calendars.entries"|trans({'%count%': calendar.calendar.objects|length}) }}
{% endfor %}
{% include '_partials/delete_modal.html.twig' with {flavour: 'revoke'} %} {% endif %} {% include '_partials/share_modal.html.twig' with {principals: allPrincipals} %} {% include '_partials/delete_modal.html.twig' with {flavour: 'calendars'} %} {% endblock %}