You are here

easy-email-type-preview.html.twig in Easy Email 8

Same filename and directory in other branches
  1. 2.0.x templates/easy-email-type-preview.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-type-preview.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. <div{{ attributes.addClass('easy-email', 'preview') }}>
  20. <fieldset data-drupal-selector="headers">
  21. <legend>{{ 'Headers' | t }}</legend>
  22. {% for header in headers %}
  23. <div data-drupal-selector="header-{{ header.name }}"><label>{{ header.name }}:</label> <span class="value">{{ header.value }}</span></div>
  24. {% endfor %}
  25. </fieldset>
  26. <fieldset data-drupal-selector="inbox-preview">
  27. <legend>{{ 'Inbox Preview' | t }}</legend>
  28. <div class="easy-email-resizable inbox-preview-resizable">
  29. {{ inbox_preview }}
  30. </div>
  31. </fieldset>
  32. {% if preview_html_url %}
  33. <fieldset data-drupal-selector="html-body" class="easy-email-resizable">
  34. <legend>{{ 'HTML Body' | t }}</legend>
  35. <iframe frameBorder="0" width="100%" height="100%" src="{{ preview_html_url }}"></iframe>
  36. </fieldset>
  37. {% endif %}
  38. {% if preview_plain_url %}
  39. <fieldset data-drupal-selector="plain-body" class="easy-email-resizable">
  40. <legend>{{ 'Plain Text Body' | t }}</legend>
  41. <iframe frameBorder="0" width="100%" height="100%" src="{{ preview_plain_url }}"></iframe>
  42. </fieldset>
  43. {% endif %}
  44. {% if attachments %}
  45. <fieldset data-drupal-selector="attachments">
  46. <legend>{{ 'Attachments' | t }}</legend>
  47. {{ attachments }}
  48. </fieldset>
  49. {% endif %}
  50. </div>