{% extends isEmbedded ? '@MauticCore/Default/raw_output.html.twig' : '@MauticCore/Default/content.html.twig' %} {% block headerTitle email.name %} {% block mauticContent 'email' %} {% block preHeader %} {% if not isEmbedded %} {{- include('@MauticCore/Helper/page_actions.html.twig', { 'item' : email, 'templateButtons' : { 'close' : securityHasEntityAccess( permissions['email:emails:viewown'], permissions['email:emails:viewother'], email.getCreatedBy() ), }, 'routeBase' : 'email', 'targetLabel': 'mautic.email.emails'|trans, 'customButtons' : [] }) -}} {% endif %} {{ include('@MauticCore/Modules/category--inline.html.twig', {'category': email.category}) }} {{ include('@MauticProject/Modules/projects.html.twig', {'item': email}) }} {% endblock %} {% set variantContent = include('@MauticCore/Variant/index.html.twig', { 'activeEntity': email, 'variants': variants, 'abTestResults': abTestResults, 'model': 'email', 'actionRoute': 'mautic_email_action', }) %} {% set showVariants = variantContent is defined and variantContent|trim is not empty %} {% set translationContent = include('@MauticCore/Translation/index.html.twig', { 'activeEntity' : email, 'translations' : translations, 'model' : 'email', 'actionRoute' : 'mautic_email_action', } ) %} {% set showTranslations = translationContent|trim is not empty %} {% set emailType = email.emailType %} {% if emailType is not defined %} {% set emailType = 'template' %} {% endif %} {% set customButtons = [] %} {% if not isEmbedded %} {% if 'list' == emailType %} {% set sendButton = { 'attr' : { 'data-toggle' : 'ajax', 'href' : email.isBackgroundSending() ? 'javascript:void(0);' : path('mautic_email_action', {'objectAction' : 'send', 'objectId' : email.getId()}), }, 'iconClass' : 'ri-send-plane-line', 'btnText' : 'mautic.email.send', 'primary' : true, 'priority' : 500, } %} {% if email.isBackgroundSending() %} {% set sendButton = sendButton|merge({'tooltip' : 'mautic.email.send.disabled'}) %} {% set sendButton = sendButton|merge({'attr' : {'disabled' : true}}) %} {% endif %} {% set customButtons = customButtons|merge([sendButton]) %} {% endif %} {% set sendButtons = [] %} {% if 'list' == emailType %} {% set scheduleButton = { 'attr': { 'class' : 'btn btn-tertiary btn-nospin', 'data-toggle': 'ajaxmodal', 'data-target': '#MauticSharedModal', 'href': path('mautic_email_action', {'objectAction': 'scheduleSend', 'objectId': email.getId()}), 'data-header': 'mautic.email.send.schedule'|trans }, 'iconClass': 'ri-calendar-schedule-line', 'btnText': 'mautic.email.send.schedule', 'primary': true, 'priority': 400 } %} {% set customButtons = customButtons|merge([scheduleButton]) %} {% endif %} {% set sendExampleButton = { 'attr' : { 'id' : 'sendEmailButton', 'class' : 'btn btn-tertiary btn-nospin', 'data-toggle' : 'ajaxmodal', 'data-target' : '#MauticSharedModal', 'href' : path('mautic_email_action', {'objectAction' : 'sendExample', 'objectId' : email.getId()}), 'data-header' : 'mautic.email.send.example'|trans, }, 'iconClass' : 'ri-mail-send-line', 'btnText' : 'mautic.email.send.example', 'primary' : true, 'priority': 300 } %} {% set customButtons = customButtons|merge([sendExampleButton]) %} {% set heatmapButton = { 'attr' : { 'class' : 'btn btn-tertiary btn-nospin', 'data-toggle' : 'email-heatmap', 'data-email' : email.getId(), 'data-target' : '#MauticSharedModal', 'href' : '#', 'data-header' : 'mautic.email.heatmap.click_heatmap'|trans, }, 'iconClass' : 'ri-fire-line', 'btnText' : 'mautic.email.heatmap.click_heatmap' } %} {% set customButtons = customButtons|merge([heatmapButton]) %} {% endif %} {# Only show A/B test button if not already a translation of an a/b test #} {% set allowAbTest = email.isTranslation(true) and translations['parent'].isVariant(true) ? false : true %} {% block publishStatus %} {% if not isEmbedded %} {{- include('@MauticCore/Helper/publishstatus_badge.html.twig', { 'entity': email, 'status': email.getPublishUp() is not null ? 'sending' : 'available', 'sendingStatus': email.getSendingStatus(), }) -}}
{% include '@MauticCore/Helper/_tag.html.twig' with { tags: [ { color: 'high-contrast', label: emailType == 'list' ? 'mautic.email.type.list.header' : (emailType == 'template' ? 'mautic.email.type.template.header' : type) } ] } %} {% if email.isVariant and not email.isVariant(true) %} {% include '@MauticCore/Helper/_tag.html.twig' with { tags: [ { color: 'blue', label: 'mautic.email.icon_tooltip.abtest', icon: 'ri-a-b', icon_only: true } ] } %} {% endif %} {% if email.isVariant(true) %} {% include '@MauticCore/Helper/_tag.html.twig' with { tags: [ { color: 'warm-gray', label: 'mautic.core.variant_of'|trans({'%parent%' : variants.parent.getName()}), icon: 'ri-organization-chart', attributes: { href: path('mautic_email_action', {'objectAction' : 'view', 'objectId' : variants.parent.id}) } } ] } %} {% endif %} {% if email.isTranslation and not email.isTranslation(true) %} {% include '@MauticCore/Helper/_tag.html.twig' with { tags: [ { color: 'blue', label: 'mautic.core.icon_tooltip.translation', icon: 'ri-translate', icon_only: true } ] } %} {% endif %} {% if email.isTranslation(true) %} {% include '@MauticCore/Helper/_tag.html.twig' with { tags: [ { color: 'warm-gray', label: 'mautic.core.translation_of'|trans({'%parent%' : translations.parent.name}), icon: 'ri-translate', attributes: { href: path('mautic_email_action', {'objectAction' : 'view', 'objectId' : translations.parent.id}) } } ] } %} {% endif %} {# Language #} {% if email.language is defined and email.language is not empty %} {% include '@MauticCore/Helper/_tag.html.twig' with { tags: [{ label: email.language|language_name, icon: 'ri-translate-2', color: 'warm-gray', attributes: { 'data-toggle': 'tooltip', 'data-placement': 'top', 'title': 'mautic.core.language'|trans } }] } %} {% endif %} {% endif %} {% endblock %} {% block actions %} {% if not isEmbedded %} {{- include('@MauticCore/Helper/page_actions.html.twig', { 'item' : email, 'templateButtons' : { 'edit' : securityHasEntityAccess( permissions['email:emails:editown'], permissions['email:emails:editother'], email.getCreatedBy(), ), 'clone' : permissions['email:emails:create'], 'abtest' : (allowAbTest and permissions['email:emails:create']), 'delete' : securityHasEntityAccess( permissions['email:emails:deleteown'], permissions['email:emails:deleteother'], email.getCreatedBy() ), }, 'routeBase' : 'email', 'customButtons' : customButtons, }) -}} {% endif %} {% endblock %} {% block content %}| {{ 'mautic.core.form.theme'|trans }} | {{ email.template }} |
| {{ 'mautic.email.from_name'|trans }} | {{ email.fromName }} |
| {{ 'mautic.email.from_email'|trans }} | {{ email.fromAddress }} |
| {{ 'mautic.email.reply_to_email'|trans }} | {{ email.replyToAddress }} |
| {{ 'mautic.email.bcc'|trans }} | {{ email.bccAddress }} |
| {{ 'mautic.email.preheader_text'|trans }} | {{ email.getPreheaderText() }} |
| {{ 'mautic.email.custom_headers'|trans }} | {{ email.headers|formatter_simple_array_to_html }} |
| {{ 'mautic.email.stat.sent'|trans }} | {{ email.sentCount }} |
| {{ 'mautic.email.stat.delivered'|trans }} | |
| {{ 'mautic.email.stat.read'|trans }} | {{ email.readCount }} |