{% import '@OroUI/macros.html.twig' as UI %} {% import '@OroCalendar/invitations.html.twig' as invitations %} {% set statuses=[ constant('Oro\\Bundle\\CalendarBundle\\Entity\\Attendee::STATUS_ACCEPTED'), constant('Oro\\Bundle\\CalendarBundle\\Entity\\Attendee::STATUS_TENTATIVE'), constant('Oro\\Bundle\\CalendarBundle\\Entity\\Attendee::STATUS_DECLINED'), ] %} {% set properties = [] %} {% for status in statuses %} {% if status != entity.invitationStatus %} {% set properties = properties|merge([ UI.link({ 'label': invitations.calendar_event_invitation_going_status(status), 'title': invitations.calendar_event_invitation_going_status(status), 'path': path('oro_calendar_event_' ~ status, {'id': entity.id}), 'data': { 'page-component-module': 'oroui/js/app/components/view-component', 'page-component-options': { 'view':'orocalendar/js/app/views/change-status-view', 'triggerEventName': triggerEventName }|json_encode } }) ]) %} {% else %} {% set properties = properties|merge([ invitations.calendar_event_invitation_going_status(status) ]) %} {% endif %} {% endfor %} {{ UI.renderHtmlProperty( 'oro.calendar.calendarevent.action.going_status.label'|trans, properties|join(' ') ) }}