PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.1.0
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.1.0
11.1.1 11.1.0 11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 All 62 releases
acymailing / back / Views / Mails / tmpl / choose_template.php

choose_template.php in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress 11.1.0, at back/Views/Mails/tmpl/choose_template.php

113 lines 5.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 class="grid-x grid-margin-x margin-top-3">
6 <?php
7 $campaignType = empty($data['campaign_type']) ? '' : $data['campaign_type'];
8 if (empty($data['allMails']) && empty($data['search']) && empty($data['tag']) && empty($data['status'])) { ?>
9 <div class="grid-x cell text-center">
10 <h1 class="acym__listing__empty__title cell"><?php echo esc_html(acym_translation('ACYM_YOU_DONT_HAVE_ANY_TEMPLATE')); ?></h1>
11 <div class="cell medium-4"></div>
12 <div class="cell medium-4">
13 <a href="<?php echo esc_url(
14 acym_completeLink(
15 acym_getVar('cmd', 'ctrl').'&task=edit&step=editEmail&from=-1&type_editor=acyEditor&campaignId='.esc_attr(
16 $data['campaignID']
17 ).'&campaign_type='.$campaignType
18 )
19 ); ?>"
20 class="button expanded"
21 id="acym__templates__choose__create__empty">
22 <?php echo esc_html(acym_translation('ACYM_START_FROM_EMPTY_TEMPLATE')); ?>
23 </a>
24 </div>
25 </div>
26 <?php } else { ?>
27 <div class="cell grid-x margin-bottom-2 grid-margin-x">
28 <div class="medium-auto cell">
29 <?php acym_filterSearch($data['search'], 'mailchoose_search', 'ACYM_SEARCH'); ?>
30 </div>
31
32 <div class="medium-auto cell">
33 <?php
34 $allTags = new stdClass();
35 $allTags->name = acym_translation('ACYM_ALL_TAGS');
36 $allTags->value = '';
37 array_unshift($data['allTags'], $allTags);
38
39 acym_select(
40 $data['allTags'],
41 'mailchoose_tag',
42 esc_attr($data["tag"]),
43 ['class' => 'acym__choose_template__filter__tags acym__select'],
44 'value',
45 'name',
46 null,
47 false,
48 true
49 ); ?>
50 </div>
51 <div class="xxlarge-3 xlarge-2 large-1 hide-for-medium-only hide-for-small-only cell"></div>
52 <div class="grid-x medium-shrink text-center cell acym__templates__choose__type-templates">
53 <?php
54 $link = acym_completeLink(
55 acym_getVar('cmd', 'ctrl').'&task=edit&step=editEmail&from=-1&type_editor=acyEditor&campaignId='.intval($data['campaignID']).'&campaign_type='.$campaignType
56 );
57 if (!empty($data['abtest'])) {
58 $link .= '&abtest=1';
59 }
60 ?>
61 <a href="<?php echo esc_url($link); ?>"
62 class="button"
63 id="acym__templates__choose__create__empty">
64 <?php echo esc_html(acym_translation('ACYM_START_FROM_EMPTY_TEMPLATE')); ?>
65 </a>
66 </div>
67 </div>
68 <?php if (empty($data['allMails'])) { ?>
69 <h1 class="cell acym__listing__empty__search__title text-center"><?php echo esc_html(acym_translation('ACYM_NO_RESULTS_FOUND')); ?></h1>
70 <?php } else { ?>
71 <div class="grid-x grid-padding-x grid-padding-y grid-margin-x grid-margin-y xxlarge-up-6 large-up-4 medium-up-3 small-up-1 cell">
72 <?php
73 foreach ($data['allMails'] as $oneTemplate) {
74 ?>
75 <div class="cell grid-x acym__templates__oneTpl acym__listing__block">
76 <?php
77 $link = acym_completeLink(
78 acym_getVar('cmd', 'ctrl').'&task=edit&step=editEmail&from='.$oneTemplate->id.'&campaignId='.intval(
79 $data['campaignID']
80 ).'&campaign_type='.$campaignType
81 );
82 if (!empty($data['abtest'])) {
83 $link .= '&abtest=1';
84 }
85 ?>
86 <input type="hidden"
87 class="acym__templates__oneTpl__choose"
88 value="<?php echo esc_url($link); ?>" />
89 <div class="cell acym__templates__pic text-center">
90 <img src="<?php echo esc_url(acym_getMailThumbnail($oneTemplate->thumbnail)); ?>" alt="<?php echo esc_attr($oneTemplate->name); ?>" />
91 <?php
92 if ($oneTemplate->drag_editor) {
93 echo '<div class="acym__templates__choose__ribbon acyeditor">'.esc_html(acym_translation('ACYM_DD_EDITOR')).'</div>';
94 } else {
95 echo '<div class="acym__templates__choose__ribbon htmleditor">'.esc_html(acym_translation('ACYM_HTML_EDITOR')).'</div>';
96 }
97 ?>
98 </div>
99 <div class="cell grid-x acym__templates__footer text-center">
100 <div class="cell acym__templates__footer__title acym_text_ellipsis" title="<?php echo esc_attr($oneTemplate->name); ?>">
101 <?php echo esc_html($oneTemplate->name); ?>
102 </div>
103 <div class="cell"><?php echo esc_html(acym_date($oneTemplate->creation_date, acym_getDateTimeFormat('ACYM_DATE_FORMAT_LC3'))); ?></div>
104 </div>
105 </div>
106 <?php } ?>
107 </div>
108 <?php $data['pagination']->display('mailchoose'); ?>
109 <?php } ?>
110 <?php } ?>
111 </div>
112 <?php
113