You are here

easy-email.html.twig in Easy Email 8

Same filename and directory in other branches
  1. 2.0.x templates/easy-email.html.twig

easy_email.html.twig Default theme implementation to present Email data.

This template is used when viewing Email pages.

Available variables:

  • content: A list of content items. Use 'content' to print all content, or
  • attributes: HTML attributes for the container element.

File

templates/easy-email.html.twig
View source
  1. {#
  2. /**
  3. * @file easy_email.html.twig
  4. * Default theme implementation to present Email data.
  5. *
  6. * This template is used when viewing Email pages.
  7. *
  8. *
  9. * Available variables:
  10. * - content: A list of content items. Use 'content' to print all content, or
  11. * - attributes: HTML attributes for the container element.
  12. *
  13. * @see template_preprocess_easy_email()
  14. *
  15. * @ingroup themeable
  16. */
  17. #}
  18. {{ attach_library('easy_email/preview') }}
  19. {% set status = is_sent ? ('Sent' | t) : ('Unsent' | t) %}
  20. <div{{ attributes.addClass('easy-email') }}>
  21. <fieldset>
  22. <legend>{{ 'Status' | t }}</legend>
  23. <div>
  24. <label>{{ 'Status' | t }}</label>: {{ status }}
  25. </div>
  26. {% if is_sent and sent_time %}
  27. <div>
  28. <label>{{ 'Sent Time' | t }}</label>: {{ sent_time | format_date('short') }}
  29. </div>
  30. {% endif %}
  31. </fieldset>
  32. <fieldset data-drupal-selector="headers">
  33. <legend>{{ 'Headers' | t }}</legend>
  34. {% for header in headers %}
  35. <div data-drupal-selector="header-{{ header.name }}"><label>{{ header.name }}:</label> <span class="value">{{ header.value }}</span></div>
  36. {% endfor %}
  37. </fieldset>
  38. <fieldset data-drupal-selector="inbox-preview">
  39. <legend>{{ 'Inbox Preview' | t }}</legend>
  40. <div class="easy-email-resizable inbox-preview-resizable">
  41. {{ inbox_preview }}
  42. </div>
  43. </fieldset>
  44. {% if preview_html_url %}
  45. <fieldset data-drupal-selector="html-body" class="easy-email-resizable">
  46. <legend>{{ 'HTML Body' | t }}</legend>
  47. <iframe frameBorder="0" width="100%" height="100%" src="{{ preview_html_url }}"></iframe>
  48. </fieldset>
  49. {% endif %}
  50. {% if preview_plain_url %}
  51. <fieldset data-drupal-selector="plain-body" class="easy-email-resizable">
  52. <legend>{{ 'Plain Text Body' | t }}</legend>
  53. <iframe frameBorder="0" width="100%" height="100%" src="{{ preview_plain_url }}"></iframe>
  54. </fieldset>
  55. {% endif %}
  56. {% if attachments %}
  57. <fieldset data-drupal-selector="attachments">
  58. <legend>{{ 'Attachments' | t }}</legend>
  59. {{ attachments }}
  60. </fieldset>
  61. {% endif %}
  62. </div>