{% extends '@OroUI/actions/view.html.twig' %} {% import '@OroCalendar/templates.html.twig' as calendarTemplates %} {% set name = entity.owner|oro_format_name|default('N/A'|trans) %} {% oro_title_set({params : {"%username%": name, "%calendarname%": entity.name|default(name) }}) %} {% block navButtons %} {% import '@OroUI/macros.html.twig' as UI %} {% if is_granted('oro_calendar_event_view') %}
{{ UI.button({ 'path' : path('oro_calendar_event_index'), 'iCss': 'fa-clock-o', 'label': 'oro.calendar.view_events'|trans, 'title': 'oro.calendar.view_events'|trans }) }}
{% endif %} {% endblock navButtons %} {% block breadcrumb %} {% if breadcrumbs is not defined %} {% set breadcrumbs = [{'label': 'oro.calendar.entity_label'|trans }] %} {% if entity.name is not empty %} {% set breadcrumbs = breadcrumbs|merge([{'label': entity.name}]) %} {% endif %} {% endif %} {% include '@OroNavigation/Menu/breadcrumbs.html.twig' %} {% endblock breadcrumb %} {% block pageHeader %} {% endblock pageHeader %} {% block stats %}{% endblock stats %} {% block calendar_connections %}
{{ form_row(user_select_form) }}
{% endblock calendar_connections %} {% block calendar_events %}
{% endblock calendar_events %} {% block content_data %} {% set calendarOptions = { calendar: entity.id, calendarOptions: calendar, eventsItemsJson: render(path('oro_api_get_calendarevents', {calendar: entity.id, start: startDate|date('c'), end: endDate|date('c'), subordinate: true})), connectionsItemsJson: render(path('oro_api_get_calendar_connections', {id: entity.id})), eventsOptions: { defaultDate: 'now'|date('c', oro_timezone()), 'containerSelector': '.calendar-events', 'itemViewTemplateSelector': '#template-view-calendar-event', 'itemFormTemplateSelector': '#template-calendar-event', 'leftHeader': 'prev,next today', 'centerHeader': 'title', 'rightHeader': 'month,agendaWeek,agendaDay', 'enableAttendeesInvitations': is_attendees_invitation_enabled() }, connectionsOptions: { 'modalContentTemplateId': isMobileVersion() ? 'connections-modal-content-template' : null, 'containerSelector': '.calendar-connections', 'containerTemplateSelector': '#template-calendar-connections', 'itemTemplateSelector': '#template-calendar-connection-item', }, colorManagerOptions: { colors: oro_config_value('oro_calendar.calendar_colors') }, invitationStatuses: [ constant('Oro\\Bundle\\CalendarBundle\\Entity\\Attendee::STATUS_ACCEPTED'), constant('Oro\\Bundle\\CalendarBundle\\Entity\\Attendee::STATUS_TENTATIVE'), constant('Oro\\Bundle\\CalendarBundle\\Entity\\Attendee::STATUS_DECLINED'), ] } %} {{ calendarTemplates.calendar_event_view_template('template-view-calendar-event') }} {{ calendarTemplates.calendar_event_form_template('template-calendar-event', event_form) }} {% endblock content_data %}