{% extends 'OroUIBundle:actions:view.html.twig' %}
{% import 'OroDataGridBundle::macros.html.twig' as dataGrid %}
{% oro_title_set({params : {"%title%": entity.name } }) %}
{% block pageHeader %}
{% set breadcrumbs = {
'entity': entity,
'indexPath': path('oro_account_index'),
'indexLabel': 'oro.account.entity_plural_label'|trans,
'entityTitle': entity.name|default('N/A'|trans)
} %}
{{ parent() }}
{% endblock pageHeader %}
{% block content_data %}
{% set accountInfo %}
{{ oro_widget_render({
'widgetType': 'block',
'url': path('oro_account_info', {id: entity.id}),
'alias': 'account-info-widget'
}) }}
{% endset %}
{% set addressBookWidget %}
{{ oro_widget_render({
'widgetType': 'block',
'contentClasses': [],
'url': path('oro_account_address_book', {id: entity.id}),
'title': 'oro.account.address_book.label'|trans
}) }}
{% endset %}
{% set dataBlocks = [{
'title': 'oro.account.sections.general'|trans,
'class': 'active',
'subblocks': [
{'data' : [accountInfo]},
{'data' : [addressBookWidget]},
]
}] %}
{% set dataBlocks = dataBlocks|merge([
{
'title' : 'oro.account.accountuser.entity_plural_label'|trans,
'subblocks': [
{
'title' : '',
'useSpan': false,
'data' : [dataGrid.renderGrid('account-user-by-account-grid', {account_id: entity.id}, { cssClass: 'inner-grid' })]
}
]
}
]) %}
{% set id = 'account-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 %}