{% extends '@OroUI/actions/view.html.twig' %} {% import '@OroUI/macros.html.twig' as UI %} {% import '@OroEntityConfig/macros.html.twig' as entityConfig %} {% import '@OroPayment/PaymentMethodsConfigsRule/macros.html.twig' as PayRuleMacro %} {% oro_title_set({params : {"%label%": entity.rule.name|default('N/A') }}) %} {% block pageHeader %} {% set breadcrumbs = { 'entity': entity, 'indexPath': path('oro_payment_methods_configs_rule_index'), 'indexLabel': 'oro.payment.paymentmethodsconfigsrule.entity_short_plural_label'|trans, 'entityTitle': entity.rule.name|default('N/A'|trans) } %} {{ parent() }} {% endblock pageHeader %} {% block content_data %} {% import '@OroUI/macros.html.twig' as UI %} {%- set paymentRuleInformation -%}
{{ UI.renderProperty('oro.rule.name.label'|trans, entity.rule.name) }} {{ UI.renderProperty('oro.rule.enabled.label'|trans, entity.rule.enabled ? 'oro.rule.enabled_yes.label'|trans : 'oro.rule.enabled_no.label'|trans ) }} {{ UI.renderProperty('oro.rule.sort_order.label'|trans, entity.rule.sortOrder) }} {{ UI.renderProperty('oro.payment.paymentmethodsconfigsrule.currency.label'|trans, entity.currency) }} {{ UI.renderProperty('oro.rule.expression.label'|trans, entity.rule.expression) }} {% if entity.destinations.count %} {{ UI.renderHtmlProperty( 'oro.payment.paymentmethodsconfigsrule.destinations.label'|trans, UI.renderList(entity.destinations)) }} {% endif %} {% if entity.methodConfigs.count %} {{ UI.renderHtmlProperty( 'oro.payment.paymentmethodsconfigsrule.method_configs.label'|trans, PayRuleMacro.renderPaymentMethodsConfigs(entity.methodConfigs, entity.currency)) }} {% endif %}
{{ entityConfig.renderDynamicFields(entity) }}
{%- endset -%} {% set dataBlocks = [ { 'title': 'oro.entity_config.block_titles.general.label'|trans, 'class': 'active', 'subblocks': [ {'data' : [paymentRuleInformation]} ] } ] %} {% set id = 'payment-rule-view' %} {% set data = {'dataBlocks': dataBlocks} %} {{ parent() }} {% endblock content_data %} {% block stats %} {# Must be empty, because parent view uses this block to render dates, which are not implemented in this entity #} {% endblock stats %}