{% extends '@OroUI/actions/view.html.twig' %} {% import '@OroDataGrid/macros.html.twig' as dataGrid %} {% import '@OroCron/macros.html.twig' as cronSchedulIntervals %} {% import '@OroScope/macros.html.twig' as scopeMacros %} {% import '@OroEntityConfig/macros.html.twig' as entityConfig %} {% oro_title_set({params : {"%name%": entity.rule.name }}) %} {% block pageHeader %} {% set breadcrumbs = { 'entity': entity, 'indexPath': path('oro_promotion_index'), 'indexLabel': 'oro.promotion.entity_plural_label'|trans, 'entityTitle': entity.rule.name } %} {{ parent() }} {% endblock pageHeader %} {% block breadcrumbs %} {% import '@OroUI/macros.html.twig' as UI %} {{ parent() }} {% if entity.rule.enabled %} {{ UI.badge('oro.promotion.rule.enabled.active'|trans, 'enabled') }} {% else %} {{ UI.badge('oro.promotion.rule.enabled.inactive'|trans, 'disabled') }} {% endif %} {% endblock breadcrumbs %} {% block content_data %} {% import '@OroUI/macros.html.twig' as UI %} {% if entity.schedules.isEmpty() %} {% set schedulesBlock = 'N/A'|trans %} {% else %} {% set labels = { wasActivatedLabel: 'oro.promotion.promotionschedule.was_activated', activeNowLabel: 'oro.promotion.promotionschedule.active_now', notActiveNowLabel: 'oro.promotion.promotionschedule.not_active_now', willBeActivatedLabel: 'oro.promotion.promotionschedule.will_be_acitivated', wasDeactivatedLabel: 'oro.promotion.promotionschedule.was_deactivated', willBeDeactivatedLabel: 'oro.promotion.promotionschedule.will_be_deacitivated' } %} {% set schedulesBlock = cronSchedulIntervals.scheduleIntervalsInfo(entity.schedules, labels) %} {% endif %} {% set discountBlock %} {% placeholder render_discount_information with {entity: entity} %} {% endset %} {%- set promotionInformation -%}