| 1 |
<?php |
| 2 |
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- View file, its variables are local to the include scope, not true globals. |
| 3 |
defined('ABSPATH') || die('Restricted Access'); |
| 4 |
?> |
| 5 |
<div id="acym__wysid__top-toolbar" class="grid-x cell"> |
| 6 |
<div class="cell grid-x" id="acym__wysid__top-toolbar__actions"> |
| 7 |
<div class="cell grid-x align-left small-4 acym_vcenter "> |
| 8 |
<i id="acym__wysid__top-toolbar__undo" class="cell shrink acymicon-rotate-left acym__wysid__top-toolbar__icon"></i> |
| 9 |
<p class="cell shrink">|</p> |
| 10 |
<i id="acym__wysid__top-toolbar__redo" class="cell shrink acymicon-repeat acym__wysid__top-toolbar__icon"></i> |
| 11 |
</div> |
| 12 |
<div class="cell grid-x auto small-4 hide-for-small-only align-center acym_vcenter"> |
| 13 |
<p class="cell shrink acym__wysid__top-toolbar__icon margin-right-1"><?php echo esc_html(acym_translation('ACYM_PREVIEW')); ?></p> |
| 14 |
<i id="acym__wysid__view__desktop" class="cell shrink acymicon-desktop text-center acym__wysid__top-toolbar__icon"></i> |
| 15 |
<i id="acym__wysid__view__smartphone" class="cell shrink acymicon-mobile text-center acym__wysid__top-toolbar__icon"></i> |
| 16 |
</div> |
| 17 |
<div class="cell grid-x small-4 align-right"> |
| 18 |
<?php if (!empty($data['mail']) && $data['mail']->type == $data['mailClass']::TYPE_OVERRIDE) { ?> |
| 19 |
<a href="<?php echo esc_url(ACYM_DOCUMENTATION.'main-pages/email-overrides/edition'); ?>" |
| 20 |
class="cell small-6 medium-shrink margin-bottom-0 acym_vcenter" |
| 21 |
target="_blank"> |
| 22 |
<i class="acymicon-book acym__wysid__top-toolbar__button__icon" data-acym-tooltip="<?php echo esc_attr(acym_translation('ACYM_DOCUMENTATION')); ?>"></i> |
| 23 |
</a> |
| 24 |
<?php } ?> |
| 25 |
<?php |
| 26 |
$ctrl = acym_getVar('cmd', 'ctrl', 'dashboard'); |
| 27 |
$type = acym_getVar('cmd', 'type', ''); |
| 28 |
|
| 29 |
$isCampaign = 'campaigns' === $ctrl; |
| 30 |
$isWelcomeOrUnsub = 'mails' === $ctrl && ('welcome' === $type || 'unsubscribe' === $type); |
| 31 |
|
| 32 |
if (acym_isAdmin() && ($isCampaign || $isWelcomeOrUnsub) && acym_isAllowed('mails')) { |
| 33 |
?> |
| 34 |
<button id="acym__wysid__saveastmpl__button" type="button" class="cell small-6 medium-shrink margin-bottom-0 margin-right-0"> |
| 35 |
<i class="acymicon-content-copy acym__wysid__top-toolbar__button__icon" |
| 36 |
data-acym-tooltip="<?php echo esc_attr(acym_translation('ACYM_SAVE_AS_TMPL')); ?>"></i> |
| 37 |
</button> |
| 38 |
<?php } ?> |
| 39 |
<?php if (acym_isAllowed('mails')) { ?> |
| 40 |
<button id="acym__wysid__test__button" type="button" class="cell small-6 medium-shrink margin-bottom-0"> |
| 41 |
<i class="acymicon-paper-plane acym__wysid__top-toolbar__button__icon" data-acym-tooltip="<?php echo esc_attr(acym_translation('ACYM_SEND_TEST')); ?>"></i> |
| 42 |
</button> |
| 43 |
<?php } ?> |
| 44 |
<p class="acym__color__white margin-bottom-0 margin-right-1" style="font-size: 26px">|</p> |
| 45 |
<button id="acym__wysid__cancel__button" type="button" class="cell small-6 medium-shrink margin-bottom-0 margin-right-1"> |
| 46 |
<i class="acymicon-ban acym__wysid__top-toolbar__button__icon" data-acym-tooltip="<?php echo esc_attr(acym_translation('ACYM_CANCEL')); ?>"></i> |
| 47 |
</button> |
| 48 |
<button id="acym__wysid__save__button" type="button" class="cell small-6 medium-shrink margin-bottom-0"> |
| 49 |
<i class="acymicon-floppy-o acym__wysid__top-toolbar__button__icon" data-acym-tooltip="<?php echo esc_attr(acym_translation('ACYM_APPLY')); ?>"></i> |
| 50 |
</button> |
| 51 |
</div> |
| 52 |
</div> |
| 53 |
<div class="cell grid-x align-left acym_vcenter" id="acym__wysid__top-toolbar__notification"> |
| 54 |
<i class="cell shrink" id="acym__wysid__top-toolbar__notification__icon"></i> |
| 55 |
<div class="cell auto margin-left-1 margin-right-1 grid-x acym_vcenter" id="acym__wysid__top-toolbar__notification__message"></div> |
| 56 |
<i class="cell grid-x shrink acymicon-close cursor-pointer margin-right-1" id="acym__wysid__top-toolbar__notification__close"></i> |
| 57 |
<div class="cell shrink grid-x" id="acym__wysid__top-toolbar__keep"><i class="acymicon-check-circle"></i></div> |
| 58 |
</div> |
| 59 |
</div> |
| 60 |
<div id="acym__wysid__text__tinymce__editor"></div> |
| 61 |
|