PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / trunk
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress vtrunk
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 / Campaigns / tmpl / listing_listing_followup.php

listing_listing_followup.php in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress trunk, at back/Views/Campaigns/tmpl/listing_listing_followup.php

238 lines 11.2 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 if (empty($data['allCampaigns'])) { ?>
5 <h1 class="cell acym__listing__empty__search__title text-center"><?php echo esc_html(acym_translation('ACYM_NO_RESULTS_FOUND')); ?></h1>
6 <?php } else { ?>
7 <div class="cell margin-bottom-1 acym__listing__actions grid-x">
8 <?php
9 acym_listingActions(
10 [
11 'duplicateFollowup' => acym_translation('ACYM_DUPLICATE'),
12 'deleteFollowup' => acym_translation('ACYM_DELETE'),
13 ]
14 );
15 ?>
16 </div>
17 <div class="cell grid-x">
18 <div class="grid-x cell auto">
19 <div class="cell acym_listing_sort-by">
20 <?php acym_sortBy(
21 [
22 'id' => acym_strtolower(acym_translation('ACYM_ID')),
23 'name' => acym_translation('ACYM_NAME'),
24 'creation_date' => acym_translation('ACYM_DATE_CREATED'),
25 'active' => acym_translation('ACYM_ACTIVE'),
26 ],
27 $data['campaign_type'],
28 $data['ordering'],
29 $data['orderingSortOrder']
30 ); ?>
31 </div>
32 </div>
33 </div>
34 <div class="grid-x acym__listing">
35 <div class="grid-x cell acym__listing__header">
36 <div class="medium-shrink small-1 cell">
37 <input id="checkbox_all" type="checkbox">
38 </div>
39 <div class="grid-x medium-auto small-11 cell acym__listing__header__title__container">
40 <div class="cell auto acym__listing__header__title">
41 <?php echo esc_html(acym_translation('ACYM_FOLLOW_UP')); ?>
42 </div>
43 <div class="cell small-3 xlarge-2 acym__listing__header__title">
44 <?php echo esc_html(acym_translation('ACYM_EMAILS')); ?>
45 </div>
46 <div class="cell show-for-large large-3 xxlarge-2 acym__listing__header__title text-center">
47 <?php echo esc_html(acym_translation('ACYM_STATUS')); ?>
48 </div>
49 <div class="cell show-for-large large-1 acym__listing__header__title text-center">
50 <?php echo esc_html(acym_translation('ACYM_OPEN')); ?>
51 </div>
52 <div class="cell show-for-large large-1 acym__listing__header__title text-center">
53 <?php echo esc_html(acym_translation('ACYM_CLICK')); ?>
54 </div>
55 <?php if (acym_isTrackingSalesActive()) { ?>
56 <div class="cell show-for-xlarge xlarge-1 acym__listing__header__title text-center">
57 <?php echo esc_html(acym_translation('ACYM_INCOME')); ?>
58 </div>
59 <?php } ?>
60 <div class="cell small-2 large-1 acym__listing__header__title text-center">
61 <?php echo esc_html(acym_translation('ACYM_ACTIVE')); ?>
62 </div>
63
64 <div class="large-1 cell hide-for-small-only hide-for-medium-only text-center acym__listing__header__title">
65 <?php echo esc_html(acym_translation('ACYM_ACTIONS')); ?>
66 </div>
67
68 <div class="cell show-for-large large-1 acym__listing__header__title text-center">
69 <?php echo esc_html(acym_translation('ACYM_ID')); ?>
70 </div>
71 </div>
72 </div>
73 <?php
74 foreach ($data['allCampaigns'] as $followup) {
75 ?>
76 <div class="grid-x cell align-middle acym__listing__row">
77 <div class="medium-shrink small-1 cell">
78 <input id="checkbox_<?php echo esc_attr($followup->id); ?>" type="checkbox" name="elements_checked[]" value="<?php echo esc_attr($followup->id); ?>">
79 </div>
80 <div class="grid-x medium-auto small-11 cell acym__followup__listing acym__listing__title__container">
81 <div class="cell auto grid-x acym__listing__title acym__followup__title">
82 <a class="cell shrink"
83 href="<?php echo esc_url(acym_completeLink(acym_getVar('cmd', 'ctrl').'&task=edit&step=followupEmail&id='.intval($followup->id))); ?>">
84 <h6 class="acym_text_ellipsis">
85 <?php echo empty($followup->name)
86 ? '<i class="acym__color__orange acym__followup__listing__unnamed__icon acymicon-exclamation-triangle"></i> '.esc_html(
87 acym_translation(
88 'ACYM_UNNAMED_FOLLOWUP'
89 )
90 ) : esc_html($followup->name); ?>
91 </h6>
92 </a>
93 <div class="cell shrink">
94 <?php
95 if (empty($data['allTriggers'][$followup->trigger])) {
96 $details = [$followup->trigger];
97 } else {
98 $details = [$data['allTriggers'][$followup->trigger]];
99 }
100 $details[] = '';
101 if (!empty($followup->condition)) {
102 if (is_array($followup->condition)) {
103 foreach ($followup->condition as $oneCondition) {
104 $details[] = $oneCondition;
105 }
106 } else {
107 $details[] = acym_translation('ACYM_MISSING_ADDON');
108 }
109 }
110 acym_info(
111 [
112 'textShownInTooltip' => implode('<br />', $details),
113 'classContainer' => 'acym__tooltip__listing',
114 ]
115 );
116 ?>
117 </div>
118 </div>
119 <div class="cell small-3 xlarge-2 grid-x">
120 <div class="cell align-center acym__followup__emails__count acym__followup_listing_main_element">
121 <?php
122 echo '<span>'.esc_html(acym_translationSprintf('ACYM_X_EMAILS', $followup->nbEmails)).'</span>';
123 if (!empty($followup->nbEmails)) {
124 ?>
125 <i class="acym__followup__emails__toggle acymicon-keyboard-arrow-down" acym-data-id="<?php echo intval($followup->id); ?>"></i>
126 <?php
127 }
128 ?>
129 </div>
130 <div class="cell acym__followup__emails__listing__subject grid-x">
131
132 </div>
133 </div>
134 <div class="cell show-for-large large-3 xxlarge-2 acym__campaign__status text-center grid-x">
135 <div class="cell acym__campaign__status__status acym__background-color__green acym__followup_listing_main_element">
136 <?php
137 echo esc_html(
138 acym_translationSprintf(
139 'ACYM_TRIGGERED_FOR_X',
140 empty($followup->subscribers) ? '0' : $followup->subscribers
141 )
142 );
143 ?>
144 </div>
145 <div class="cell acym__followup__emails__listing__status grid-x">
146
147 </div>
148 </div>
149 <div class="cell show-for-large large-1 text-center grid-x">
150 <div class="cell acym__followup_listing_main_element">
151 <?php
152 if (!empty($followup->subscribers) && isset($followup->open)) {
153 echo esc_html($followup->open).'%';
154 } else {
155 echo '-';
156 }
157 ?>
158 </div>
159 <div class="cell acym__followup__emails__listing__open grid-x">
160
161 </div>
162 </div>
163 <div class="cell show-for-large large-1 text-center grid-x">
164 <div class="cell acym__followup_listing_main_element">
165 <?php
166 if (!empty($followup->subscribers) && isset($followup->click)) {
167 echo esc_html($followup->click).'%';
168 } else {
169 echo '-';
170 }
171 ?>
172 </div>
173 <div class="cell acym__followup__emails__listing__click grid-x">
174
175 </div>
176 </div>
177 <?php if (acym_isTrackingSalesActive()) { ?>
178 <div class="cell show-for-xlarge xlarge-1 text-center grid-x">
179 <div class="cell acym__followup_listing_main_element">
180 <?php
181 if (!empty($followup->sale) && !empty($followup->currency)) {
182 echo esc_html(round($followup->sale, 2).' '.$followup->currency);
183 } else {
184 echo '-';
185 }
186 ?>
187 </div>
188 <div class="cell acym__followup__emails__listing__income grid-x">
189
190 </div>
191 </div>
192 <?php } ?>
193 <div class="cell small-2 large-1 text-center">
194 <?php
195 $class = $followup->active == 1 ? 'acymicon-check-circle acym__color__green' : 'acymicon-times-circle acym__color__red';
196 $newvalue = $followup->active == 1 ? 0 : 1;
197 echo '<i data-acy-table="followup"
198 data-acy-field="active"
199 data-acy-elementid="'.esc_attr($followup->id).'"
200 data-acy-newvalue="'.esc_attr($newvalue).'"
201 class="acym_toggleable '.esc_attr($class).'"></i>';
202 ?>
203 </div>
204 <div class="large-1 hide-for-small-only hide-for-medium-only cell text-center">
205 <a href="<?php echo esc_url(acym_completeLink('campaigns&task=edit&step=followupEmail&id='.$followup->id)); ?>">
206 <i class="acymicon-pencil" title="<?php echo esc_attr(acym_translation('ACYM_EDIT')); ?>"></i>
207 </a>
208 <a><i class="acymicon-content-copy fastActions"
209 data-action="duplicateFollowup"
210 data-acy-elementid="<?php echo esc_attr($followup->id); ?>"
211 title="<?php echo esc_attr(acym_translation('ACYM_DUPLICATE')); ?>"></i>
212 </a>
213 <?php
214 $mailIds = (isset($followup->mail_ids) && is_array($followup->mail_ids))
215 ? $followup->mail_ids
216 : (isset($followup->mail_ids) ? [$followup->mail_ids]
217 : []); ?>
218 <a href="<?php echo esc_url(acym_completeLink('stats&mail_ids[]='.implode('&mail_ids[]=', $mailIds))); ?>">
219 <i class="acymicon-rectangle-bar-chart" title="<?php echo esc_attr(acym_translation('ACYM_STATISTICS')); ?>"></i>
220 </a>
221 <i class="cursor-pointer acymicon-delete fastActions deleteFastAction"
222 data-action="deleteFollowup"
223 data-acy-elementid="<?php echo esc_attr($followup->id); ?>"
224 title="<?php echo esc_attr(acym_translation('ACYM_DELETE')); ?>"></i>
225
226 </div>
227 <div class="cell show-for-large large-1 text-center acym__listing__text">
228 <?php echo esc_html($followup->id); ?>
229 </div>
230 </div>
231 </div>
232 <?php
233 }
234 ?>
235 </div>
236 <?php $data['pagination']->display('campaigns');
237 }
238