{% extends '@OroUI/actions/view.html.twig' %} {% set hasGrantedNameView = is_granted('VIEW', entity, 'name') %} {% oro_title_set({params : {"%opportunity.name%": hasGrantedNameView ? entity.name|default('N/A'|trans) : 'view %fieldName% not granted'|trans({'%fieldName%': 'oro.sales.opportunity.name.label'|trans}) }}) %} {% block navButtons %} {% import '@OroUI/macros.html.twig' as UI %} {% if is_granted('EDIT', entity) %} {{ UI.editButton({ 'path' : path('oro_sales_opportunity_update', { 'id': entity.id }), 'entity_label': 'oro.sales.opportunity.entity_label'|trans }) }} {% endif %} {% if is_granted('DELETE', entity) %} {{ UI.deleteButton({ 'dataUrl': path('oro_api_delete_opportunity', {'id': entity.id}), 'dataRedirect': path('oro_sales_opportunity_index'), 'aCss': 'no-hash remove-button', 'id': 'btn-remove-contact', 'dataId': entity.id, 'entity_label': 'oro.sales.opportunity.entity_label'|trans }) }} {% endif %} {% endblock navButtons %} {% block pageHeader %} {% import '@OroUI/macros.html.twig' as UI %} {% set breadcrumbs = { 'entity': entity, 'indexPath': path('oro_sales_opportunity_index'), 'indexLabel': 'oro.sales.opportunity.entity_plural_label'|trans, 'rawEntityTitle': not hasGrantedNameView, 'entityTitle': hasGrantedNameView ? entity.name|default('N/A'|trans) : UI.renderDisabledLabel('view %fieldName% not granted'|trans({'%fieldName%': 'oro.sales.opportunity.name.label'|trans})) } %} {{ parent() }} {% endblock pageHeader %} {% block stats %} {% if is_granted('VIEW', entity, 'createdAt') %}