{% if is_granted('oro_sales_b2bcustomer_view') and customers|length > 0 %} {% set tabs = [] %} {% for customer in customers %} {% set tabs = tabs|merge([ { 'alias': 'oro_sales_b2bcustomer_info_customer_' ~ customer.id ~ '_channel_' ~ channel.id, 'widgetType': 'customer-info', 'label': customer|oro_format_name, 'url': path('oro_sales_widget_b2bcustomer_info', { 'id': customer.id, 'channelId': channel.id }) } ]) %} {% endfor %} {% if (tabs|length > 1) %} {% if not isMobileVersion() %} {% set tabsOptions = { verticalTabs: true, useDropdown: false, subtitle: 'oro.sales.customer.entity_plural_label'|trans }%} {% endif %} {% import '@OroUI/macros.html.twig' as UI %}
{{ tabPanel(tabs, tabsOptions|default({})) }}
{% else %}
{{ oro_widget_render(tabs[0]) }}
{% endif %} {% endif %}