{% extends '@OroUI/actions/view.html.twig' %} {% import '@OroUI/macros.html.twig' as macros %} {% set fullname = entity|oro_format_name|default('oro.entity.item'|trans({'%id%': entity.id})) %} {% oro_title_set({params : {"%contact.name%": fullname} }) %} {% block navButtons %} {% import '@OroUI/macros.html.twig' as UI %} {% if is_granted('EDIT', entity) %} {{ UI.editButton({ 'path' : path('oro_contact_update', { 'id': entity.id }), 'entity_label': 'oro.contact.entity_label'|trans }) }} {% endif %} {% if is_granted('DELETE', entity) %} {{ UI.deleteButton({ 'dataUrl': path('oro_api_delete_contact', {'id': entity.id}) , 'dataRedirect': path('oro_contact_index'), 'aCss': 'no-hash remove-button', 'id': 'btn-remove-contact', 'dataId': entity.id, 'entity_label': 'oro.contact.entity_label'|trans, }) }} {% endif %} {% endblock navButtons %} {% block pageHeader %} {% set breadcrumbs = { 'entity': entity, 'indexPath': path('oro_contact_index'), 'indexLabel': 'oro.contact.entity_plural_label'|trans, 'entityTitle': fullname } %} {{ parent() }} {% endblock pageHeader %} {% block pageTitleIcon %}
{%- include '@OroAttachment/Twig/picture.html.twig' with { file: entity.picture, filter: 'avatar_med', img_attrs: { alt: entity|oro_format_name } } -%}
{% endblock %} {% block stats %} {% include '@OroContact/Contact/headerStats.html.twig' with {'entity': entity} %} {% endblock stats %} {% block content_data %} {% set contactInformationWidget %} {{ oro_widget_render({ 'widgetType': 'block', 'url': path('oro_contact_info', {id: entity.id}), 'title': 'Contact Information'|trans }) }} {% endset %} {% set addressBookWidget %} {{ oro_widget_render({ 'widgetType': 'block', 'contentClasses': [], 'url': path('oro_contact_address_book', {id: entity.id}), 'title': 'Address Book'|trans }) }} {% endset %} {% set dataBlocks = [ { 'title': 'General Information'|trans, 'subblocks': [ {'data' : [contactInformationWidget] }, {'data' : [addressBookWidget] }, ] } ] %} {% set id = 'contactView' %} {% set data = {'dataBlocks': dataBlocks} %} {{ parent() }} {% endblock content_data %}