{% extends 'OroUIBundle:actions:view.html.twig' %} {% import 'OroUIBundle::macros.html.twig' as macros %} {% set fullname = entity|oro_format_name|default('N/A'|trans) %} {% oro_title_set({params : {"%contact.name%": fullname} }) %} {% block navButtons %} {% if resource_granted('EDIT', entity) %} {{ UI.editButton({ 'path' : path('orocrm_contact_update', { 'id': entity.id }), 'entity_label': 'orocrm.contact.entity_label'|trans }) }} {% endif %} {% if resource_granted('DELETE', entity) %} {{ UI.deleteButton({ 'dataUrl': path('oro_api_delete_contact', {'id': entity.id}) , 'dataRedirect': path('orocrm_contact_index'), 'aCss': 'no-hash remove-button', 'id': 'btn-remove-contact', 'dataId': entity.id, 'entity_label': 'orocrm.contact.entity_label'|trans, }) }} {% endif %} {% endblock navButtons %} {% block pageHeader %} {% set breadcrumbs = { 'entity': entity, 'indexPath': path('orocrm_contact_index'), 'indexLabel': 'orocrm.contact.entity_plural_label'|trans, 'entityTitle': fullname } %} {% set avatar = oro_configured_image_url(entity, 'picture') %} {{ parent() }} {% endblock pageHeader %} {% block stats %} {% include 'OroCRMContactBundle:Contact:headerStats.html.twig' with {'entity': entity} %} {% endblock stats %} {% block content_data %} {% set contactInformationWidget %} {{ oro_widget_render({ 'widgetType': 'block', 'url': path('orocrm_contact_info', {id: entity.id}), 'title': 'Contact Information'|trans }) }} {% endset %} {% set addressBookWidget %} {{ oro_widget_render({ 'widgetType': 'block', 'contentClasses': [], 'url': path('orocrm_contact_address_book', {id: entity.id}), 'title': 'Address Book'|trans }) }} {% endset %} {% set dataBlocks = [ { 'title': 'General Information'|trans, 'class': 'active', 'subblocks': [ {'data' : [contactInformationWidget] }, {'data' : [addressBookWidget] }, ] } ] %} {% set id = 'contactView' %} {% set data = {'dataBlocks': dataBlocks} %} {{ parent() }} {% endblock content_data %}