{% extends '@OroDashboard/Dashboard/widget.html.twig' %} {% import '@OroCalendar/macros.html.twig' as calendarMacros %} {% import '@OroCalendar/templates.html.twig' as calendarTemplates %} {% block content %} {% set dashboardCalendarOptions = { widgetId: widgetId, calendar: entity.id, aspectRatio: 2, 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-' ~ widgetId, 'itemFormTemplateSelector': '#template-calendar-event-' ~ widgetId, 'defaultView': 'agendaDay', 'firstHour': firstHour, 'aspectRatio': 2, 'recoverView': false, 'allDayHtml': calendarMacros.briefDateCell('now'), 'enableAttendeesInvitations': is_attendees_invitation_enabled() }, connectionsOptions: {}, 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-' ~ widgetId) }} {{ calendarTemplates.calendar_event_form_template('template-calendar-event-' ~ widgetId, event_form) }} {% endblock %} {% block actions %} {% set actions = [ { 'label': 'oro.dashboard.calendar.new_event'|trans, 'data': {'action-name': 'new-event'} }, { 'type': 'link', 'label': 'oro.dashboard.calendar.view_calendar'|trans, 'url': path('oro_calendar_view_default') } ] %} {{ parent() }} {% endblock %}