{% extends '@OroUI/actions/view.html.twig' %} {% import '@OroUI/macros.html.twig' as UI %} {% set fullname = entity|oro_format_name|default('N/A'|trans) %} {% oro_title_set({params : {"%username%": fullname }}) %} {% block navButtons %} {% import '@OroUI/macros.html.twig' as UI %} {% placeholder view_navButtons with {entity: entity} %} {% if isDesktopVersion() %} {% if is_granted('CONFIGURE', entity) and not isProfileView %} {{ UI.button({ 'path' : path('oro_user_config', { 'id': entity.id }), 'label': 'oro.user.user_configuration.label'|trans, 'title': 'oro.user.user_configuration.label'|trans, 'iCss': 'fa-cog', }) }} {% elseif isProfileView and is_granted('update_own_configuration') %} {{ UI.button({ 'path' : path('oro_user_profile_configuration'), 'label': 'oro.user.user_configuration.label'|trans, 'title': 'oro.user.user_configuration.label'|trans, 'iCss': 'fa-cog', }) }} {% endif %} {% endif %} {% if is_granted('EDIT', entity) and not isProfileView %} {{ UI.editButton({ 'path' : path('oro_user_update', { id: entity.id }), 'entity_label': 'oro.user.entity_label'|trans }) }} {% elseif isProfileView and is_granted('update_own_profile') %} {{ UI.editButton({ 'path': path('oro_user_profile_update'), 'entity_label': 'profile'|trans }) }} {% endif %} {% if is_granted('DELETE', entity) and entity.id != app.user.id %} {{ UI.deleteButton({ 'dataUrl': path('oro_api_delete_user', {'id': entity.id}), 'dataRedirect': path('oro_user_index'), 'aCss': 'no-hash remove-button', 'id': 'btn-remove-user', 'dataId': entity.id, 'entity_label': 'oro.user.entity_label'|trans, 'disabled': not allow_delete }) }} {% endif %} {% endblock navButtons %} {% block pageHeader %} {% set breadcrumbs = { 'entity': entity, 'indexLabel': 'oro.user.entity_plural_label'|trans, 'entityTitle': fullname, } %} {% if (feature_resource_enabled('oro_user_index', 'routes')) %} {% set breadcrumbs = breadcrumbs|merge({'indexPath': path('oro_user_index')}) %} {% endif %} {{ parent() }} {% endblock pageHeader %} {% block pageTitleIcon %}