{% extends '@OroUI/actions/view.html.twig' %} {% import '@OroDataGrid/macros.html.twig' as dataGrid %} {% oro_title_set({params : {"%business_unit.name%": entity.name|default('N/A') }}) %} {% block navButtons %} {% import '@OroUI/macros.html.twig' as UI %} {% if is_granted('EDIT', entity) %} {{ UI.editButton({ 'path' : path('oro_business_unit_update', { id: entity.id }), 'entity_label': 'oro.organization.businessunit.entity_label'|trans }) }} {% endif %} {% if oro_get_business_units_count() > 1 and is_granted('DELETE', entity) %} {{ UI.deleteButton({ 'dataUrl': path('oro_api_delete_businessunit', {'id': entity.id}), 'dataRedirect': path('oro_business_unit_index'), 'aCss': 'no-hash remove-button', 'id': 'btn-remove-business_unit', 'dataId': entity.id, 'entity_label': 'oro.organization.businessunit.entity_label'|trans, 'disabled': not allow_delete }) }} {% endif %} {% endblock navButtons %} {% block pageHeader %} {% set breadcrumbs = { 'entity': entity, 'indexPath': path('oro_business_unit_index'), 'indexLabel': 'oro.organization.businessunit.entity_plural_label'|trans, 'entityTitle': entity.name|default('N/A'), } %} {{ parent() }} {% endblock pageHeader %} {% block content_data %} {% set businessUnitInformationWidget %} {{ oro_widget_render({ 'widgetType': 'block', 'url': path('oro_business_unit_widget_info', {id: entity.id}) }) }} {% endset %} {% set businessUnitUsersWidget %} {{ oro_widget_render({ 'widgetType': 'block', 'url': path('oro_business_unit_widget_users', {id: entity.id}) }) }} {% endset %} {% set dataBlocks = [ { 'title': 'General Information'|trans, 'class': 'active', 'subblocks': [ {'data' : [businessUnitInformationWidget]} ] }, { 'title': 'oro.organization.businessunit.users.label'|trans, 'subblocks': [ {'data' : [businessUnitUsersWidget]} ] }, ] %} {% set id = 'businessUnitView' %} {% set data = { 'dataBlocks': dataBlocks } %} {{ parent() }} {% endblock content_data %}