easy-email.html.twig in Easy Email 8
Same filename and directory in other branches
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.
See also
File
templates/easy-email.html.twigView source
- {#
- /**
- * @file 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.
- *
- * @see template_preprocess_easy_email()
- *
- * @ingroup themeable
- */
- #}
- {{ attach_library('easy_email/preview') }}
- {% set status = is_sent ? ('Sent' | t) : ('Unsent' | t) %}
- <div{{ attributes.addClass('easy-email') }}>
- <fieldset>
- <legend>{{ 'Status' | t }}</legend>
- <div>
- <label>{{ 'Status' | t }}</label>: {{ status }}
- </div>
- {% if is_sent and sent_time %}
- <div>
- <label>{{ 'Sent Time' | t }}</label>: {{ sent_time | format_date('short') }}
- </div>
- {% endif %}
- </fieldset>
- <fieldset data-drupal-selector="headers">
- <legend>{{ 'Headers' | t }}</legend>
- {% for header in headers %}
- <div data-drupal-selector="header-{{ header.name }}"><label>{{ header.name }}:</label> <span class="value">{{ header.value }}</span></div>
- {% endfor %}
- </fieldset>
- <fieldset data-drupal-selector="inbox-preview">
- <legend>{{ 'Inbox Preview' | t }}</legend>
- <div class="easy-email-resizable inbox-preview-resizable">
- {{ inbox_preview }}
- </div>
- </fieldset>
- {% if preview_html_url %}
- <fieldset data-drupal-selector="html-body" class="easy-email-resizable">
- <legend>{{ 'HTML Body' | t }}</legend>
- <iframe frameBorder="0" width="100%" height="100%" src="{{ preview_html_url }}"></iframe>
- </fieldset>
- {% endif %}
- {% if preview_plain_url %}
- <fieldset data-drupal-selector="plain-body" class="easy-email-resizable">
- <legend>{{ 'Plain Text Body' | t }}</legend>
- <iframe frameBorder="0" width="100%" height="100%" src="{{ preview_plain_url }}"></iframe>
- </fieldset>
- {% endif %}
- {% if attachments %}
- <fieldset data-drupal-selector="attachments">
- <legend>{{ 'Attachments' | t }}</legend>
- {{ attachments }}
- </fieldset>
- {% endif %}
- </div>