{% extends '@OroUI/actions/view.html.twig' %} {% oro_title_set({params : {"%email%": entity.email }}) %} {% block pageHeader %} {% set breadcrumbs = { 'entity': entity, 'indexPath': path('oro_customer_customer_user_index'), 'indexLabel': 'oro.customer.customeruser.entity_plural_label'|trans, 'entityTitle': entity.username|default('N/A'|trans) } %} {{ parent() }} {% endblock pageHeader %} {% block breadcrumbs %} {% import '@OroUI/macros.html.twig' as UI %} {{ parent() }} {% if entity.enabled %} {{ UI.badge('oro.customer.customeruser.profile.statuses.enabled'|trans, 'enabled') }} {% else %} {{ UI.badge('oro.customer.customeruser.profile.statuses.disabled'|trans, 'disabled') }} {% endif %} {% placeholder view_page_title_status with {entity: entity} %} {% endblock breadcrumbs %} {% block stats %} {% if is_granted('oro_customer_view_user_login_attempt') %} {% set loginAttempts %} {{ 'oro.customer.customeruser.last_login.label'|trans }}: {{ entity.lastLogin ? entity.lastLogin|oro_format_datetime : 'N/A'|trans }} {% endset %} {% else %} {% set loginAttempts %} {{ 'oro.customer.customeruser.last_login.label'|trans }}: {{ entity.lastLogin ? entity.lastLogin|oro_format_datetime : 'N/A'|trans }} {% endset %} {% endif %}
  • {{ 'oro.ui.created_at'|trans }}: {{ entity.createdAt ? entity.createdAt|oro_format_datetime : 'N/A'|trans }}
  • {{ 'oro.ui.updated_at'|trans }}: {{ entity.updatedAt ? entity.updatedAt|oro_format_datetime : 'N/A'|trans }}
  • {{ loginAttempts }}
  • {{ 'oro.customer.customeruser.login_count.label'|trans }}: {{ entity.loginCount|default(0) }}
  • {% endblock stats %} {% block content_data %} {% set customerUserInformationWidget %} {{ oro_widget_render({ 'widgetType': 'block', 'url': path('oro_customer_customer_user_info', {id: entity.id}) }) }} {% endset %} {% set addressBookWidget %} {% if is_granted('oro_customer_customer_user_address_view') %} {{ oro_widget_render({ 'widgetType': 'block', 'contentClasses': [], 'url': path('oro_customer_customer_user_address_book', {id: entity.id}), 'title': 'oro.customer.customeruser.address_book.label'|trans }) }} {% endif %} {% endset %} {% set dataBlocks = [ { 'title': 'oro.customer.sections.general'|trans, 'subblocks': [ {'data' : [customerUserInformationWidget]}, {'data' : [addressBookWidget]}, ] } ] %} {% set id = 'customer-user-view' %} {% set data = {'dataBlocks': dataBlocks} %} {{ parent() }} {% endblock content_data %}