{# Available variables: * entity - email entity Oro\Bundle\EmailBundle\Entity\Email #} {% extends '@OroUI/actions/view.html.twig' %} {% import '@OroUI/macros.html.twig' as UI %} {% import '@OroEmail/macros.html.twig' as EA %} {% set name = app.user|oro_format_name|default('N/A') %} {% oro_title_set({params : {"%subject%": entity.subject|oro_html_strip_tags, "%username%": name} }) %} {% block pageHeader %} {% set breadcrumbs = { 'entity': entity, 'indexPath': path('oro_email_user_emails'), 'indexLabel': 'oro.email.entity_plural_label'|trans, 'entityTitle': entity.subject|oro_html_strip_tags, } %} {{ parent() }} {% endblock pageHeader %} {% block breadcrumb %} {% set breadcrumbs = [ {'label': 'oro.email.menu.user_emails'|trans } ] %} {% include '@OroNavigation/Menu/breadcrumbs.html.twig' %} {% endblock breadcrumb %} {% block stats %}
  • {{ 'oro.ui.created_at'|trans }}: {{ breadcrumbs.entity.created ? breadcrumbs.entity.created|oro_format_datetime : 'N/A' }}
  • {% endblock stats %} {% block navButtons %}{% endblock navButtons %} {% block content_data %} {% import '@OroUI/macros.html.twig' as UI %} {% set id = 'email-profile' %} {% set attributes = [ UI.attibuteRow('oro.email.sent_at.label'|trans, entity.sentAt|oro_format_datetime), UI.attibuteRow('oro.email.from_name.label'|trans, EA.email_address(entity.fromEmailAddress, entity.fromName)), UI.attibuteRow('To'|trans, EA.recipient_email_addresses(entity.recipients('to'))) ] %} {% if entity.recipients('cc')|length > 0 %} {% set attributes = attributes | merge([ UI.attibuteRow('Cc'|trans, EA.recipient_email_addresses(entity.recipients('cc'))) ]) %} {% endif %} {% if entity.recipients('bcc')|length > 0 %} {% set attributes = attributes | merge([ UI.attibuteRow('Bcc'|trans, EA.recipient_email_addresses(entity.recipients('bcc'))) ]) %} {% endif %} {% set attributes = attributes | merge([ UI.attibuteRow('oro.email.subject.label'|trans, entity.subject) ]) %} {% if noBodyFound %} {% set notFoundMessage %}{{ 'oro.email.unable_to_load_body'|trans}}{% endset %} {% set attributes = attributes | merge([UI.attibuteRow('', notFoundMessage)]) %} {% else %} {% if entity.emailBody.hasAttachments and attachments is defined %} {% set attributes = attributes | merge([UI.attibuteRow( 'Attachments'|trans, EA.attachments(attachments, targetEntityData) )]) %} {% endif %} {% if entity.emailBody.bodyContent is empty %} {% set attributes = attributes | merge([UI.attibuteRow('', 'oro.email.empty_body'|trans)]) %} {% else %} {% set attributes = attributes | merge([EA.body(entity.emailBody)]) %} {% endif %} {% endif %} {% set data = { 'dataBlocks': [ { 'title': 'General'|trans, 'class': 'active', 'subblocks': [ { 'title': null, 'useSpan': false, 'data': attributes } ] } ] } %} {{ parent() }} {% endblock content_data %}