| @@ -1,244 +1,0 @@ | ||
| 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="acym__content acym__stats grid-x cell"> | |
| 6 | - <input type="hidden" name="time_linechart" id="acym__time__linechart__input"> | |
| 7 | - <div class="cell acym__stats__campaign-choose margin-bottom-1 large-3 medium-4 small-12"> | |
| 8 | - <?php if ($data['page_title']) { ?> | |
| 9 | - <h2 class="acym__title"><?php echo esc_html(acym_translation('ACYM_GLOBAL_STATISTICS')); ?></h2> | |
| 10 | - <?php } ?> | |
| 11 | - </div> | |
| 12 | - <div class="large-9 medium-8 small-12 margin-bottom-1 cell acym__stats__export grid-x align-right grid-margin-x"> | |
| 13 | - <?php if (!$data['page_title']) { ?> | |
| 14 | - <div class="cell small-5 medium-4 large-3 xlarge-2"> | |
| 15 | - <?php | |
| 16 | - acym_select( | |
| 17 | - [ | |
| 18 | - 'charts' => acym_translation('ACYM_CHARTS'), | |
| 19 | - 'formatted' => acym_translation('ACYM_FORMATTED_DATA'), | |
| 20 | - 'full' => acym_translation('ACYM_FULL_DATA'), | |
| 21 | - ], | |
| 22 | - 'export_type', | |
| 23 | - 'charts', | |
| 24 | - ['class' => 'acym__select'], | |
| 25 | - 'value', | |
| 26 | - 'text', | |
| 27 | - null, | |
| 28 | - false, | |
| 29 | - true | |
| 30 | - ); | |
| 31 | - ?> | |
| 32 | - </div> | |
| 33 | - <?php | |
| 34 | - acym_tooltip([ | |
| 35 | - 'hoveredText' => '<button type="button" class="cell shrink button primary acym__stats__export__button acym__stats__export__global__charts " data-task="exportGlobal">' | |
| 36 | - .acym_translation('ACYM_EXPORT').'</button>', | |
| 37 | - 'textShownInTooltip' => acym_translation('ACYM_STATS_EXPORT_SETTINGS_TOOLTIP'), | |
| 38 | - ]); | |
| 39 | - } ?> | |
| 40 | - </div> | |
| 41 | - <?php if (!empty($data['selectedMailid']) && !empty($data['lists'])) { ?> | |
| 42 | - <div class="cell grid-x margin-bottom-1"> | |
| 43 | - <h2 class="cell shrink acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_RECEIVER_LISTS')); ?></h2> | |
| 44 | - <div class="cell grid-x auto margin-left-1"> | |
| 45 | - <?php | |
| 46 | - foreach ($data['lists'] as $list) { | |
| 47 | - acym_tooltip( | |
| 48 | - [ | |
| 49 | - 'hoveredText' => '<i style="color: '.$list->color.'" class="acym_subscription acymicon-circle"></i>', | |
| 50 | - 'textShownInTooltip' => $list->name, | |
| 51 | - ] | |
| 52 | - ); | |
| 53 | - } | |
| 54 | - ?> | |
| 55 | - </div> | |
| 56 | - <h2 class="cell acym__title acym__title__secondary"> | |
| 57 | - <?php echo esc_html(acym_translationSprintf('ACYM_NUMBER_OF_RECEIVERS_X', $data['mail']->sent)); ?> | |
| 58 | - </h2> | |
| 59 | - </div> | |
| 60 | - <?php } ?> | |
| 61 | - <?php if (empty($data['sentMails'])) { ?> | |
| 62 | - <h2 class="acym__listing__empty__title text-center cell margin-bottom-1"> | |
| 63 | - <?php echo esc_html(acym_translation('ACYM_DONT_HAVE_STATS_CAMPAIGN')); ?> | |
| 64 | - <a href="<?php echo esc_url(acym_completeLink('campaigns&task=edit&step=chooseTemplate')); ?>"><?php echo esc_html( | |
| 65 | - acym_translation('ACYM_CREATE_ONE') | |
| 66 | - ); ?></a> | |
| 67 | - </h2> | |
| 68 | - <?php } ?> | |
| 69 | - <div class="cell grid-x grid-margin-y" id="acym__stats__export__global__charts__scope"> | |
| 70 | - <div class="cell grid-x acym__content acym__stats__donut__chart align-center"> | |
| 71 | - <h2 class="cell acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_EMAIL_STATISTICS')); ?></h2> | |
| 72 | - <?php if (empty($data['sentMails'])) { ?> | |
| 73 | - <h4 class="cell acym__subtitle__stats text-center"><b><?php echo esc_html(acym_translation('ACYM_LOOK_AT_THESE_AMAZING_DONUTS')); ?></b></h4> | |
| 74 | - <?php } ?> | |
| 75 | - <div class="acym__stats__donut__one-chart cell large-2 medium-4 small-12"> | |
| 76 | - <?php | |
| 77 | - ob_start(); | |
| 78 | - acym_tooltip( | |
| 79 | - [ | |
| 80 | - 'hoveredText' => acym_translation('ACYM_SUCCESSFULLY_SENT'), | |
| 81 | - 'textShownInTooltip' => $data['mail']->allSent, | |
| 82 | - ] | |
| 83 | - ); | |
| 84 | - $tooltip = ob_get_clean(); | |
| 85 | - acym_displayRoundChart( | |
| 86 | - $data['mail']->percentageSent, | |
| 87 | - 'delivery', | |
| 88 | - '', | |
| 89 | - $tooltip | |
| 90 | - ); ?> | |
| 91 | - </div> | |
| 92 | - <div class="acym__stats__donut__one-chart cell large-2 medium-4 small-12"> | |
| 93 | - <?php | |
| 94 | - ob_start(); | |
| 95 | - acym_tooltip( | |
| 96 | - [ | |
| 97 | - 'hoveredText' => acym_translation('ACYM_OPEN_RATE'), | |
| 98 | - 'textShownInTooltip' => $data['mail']->allOpen, | |
| 99 | - ] | |
| 100 | - ); | |
| 101 | - $tooltip = ob_get_clean(); | |
| 102 | - acym_displayRoundChart( | |
| 103 | - $data['mail']->percentageOpen, | |
| 104 | - 'open', | |
| 105 | - '', | |
| 106 | - $tooltip | |
| 107 | - ); ?> | |
| 108 | - </div> | |
| 109 | - <div class="acym__stats__donut__one-chart cell large-2 medium-4 small-12"> | |
| 110 | - <?php | |
| 111 | - ob_start(); | |
| 112 | - acym_tooltip( | |
| 113 | - [ | |
| 114 | - 'hoveredText' => acym_translation('ACYM_CLICK_RATE'), | |
| 115 | - 'textShownInTooltip' => $data['mail']->allClick, | |
| 116 | - ] | |
| 117 | - ); | |
| 118 | - $tooltip = ob_get_clean(); | |
| 119 | - acym_displayRoundChart( | |
| 120 | - $data['mail']->percentageClick, | |
| 121 | - 'click', | |
| 122 | - '', | |
| 123 | - $tooltip | |
| 124 | - ); ?> | |
| 125 | - </div> | |
| 126 | - <div class="acym__stats__donut__one-chart cell large-2 medium-4 small-12"> | |
| 127 | - <?php | |
| 128 | - ob_start(); | |
| 129 | - acym_tooltip( | |
| 130 | - [ | |
| 131 | - 'hoveredText' => acym_translation('ACYM_BOUNCE_RATE'), | |
| 132 | - 'textShownInTooltip' => $data['mail']->allBounce, | |
| 133 | - ] | |
| 134 | - ); | |
| 135 | - $tooltip = ob_get_clean(); | |
| 136 | - acym_displayRoundChart( | |
| 137 | - $data['mail']->percentageBounce, | |
| 138 | - 'bounce', | |
| 139 | - '', | |
| 140 | - $tooltip | |
| 141 | - ); ?> | |
| 142 | - </div> | |
| 143 | - <?php if (!empty($data['selectedMailid'])) { ?> | |
| 144 | - <div class="acym__stats__donut__one-chart cell large-2 medium-4 small-12"> | |
| 145 | - <?php | |
| 146 | - ob_start(); | |
| 147 | - acym_tooltip( | |
| 148 | - [ | |
| 149 | - 'hoveredText' => acym_translation('ACYM_UNSUBSCRIBE_RATE'), | |
| 150 | - 'textShownInTooltip' => $data['mail']->allUnsub, | |
| 151 | - ] | |
| 152 | - ); | |
| 153 | - $tooltip = ob_get_clean(); | |
| 154 | - acym_displayRoundChart( | |
| 155 | - $data['mail']->percentageUnsub, | |
| 156 | - 'unsubscribe', | |
| 157 | - '', | |
| 158 | - $tooltip | |
| 159 | - ); ?> | |
| 160 | - </div> | |
| 161 | - <?php } ?> | |
| 162 | - </div> | |
| 163 | - <div class="cell grid-x acym__content acym__stats__pie__chart"> | |
| 164 | - <h2 class="cell acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_OPENING_PLATFORMS')); ?></h2> | |
| 165 | - <?php if (empty($data['devices'])) { ?> | |
| 166 | - <h4 class="cell acym__subtitle__stats text-center"><b><?php echo esc_html(acym_translation('ACYM_EMAIL_NOT_OPEN_EXAMPLE_STATS')); ?></b></h4> | |
| 167 | - <div class="cell large-3 hide-for-small-only hide-for-medium-only"></div> | |
| 168 | - <div class="acym__stats__pie__one-chart cell large-3 medium-6"> | |
| 169 | - <?php acym_pieChart($data['example_devices_chart'], '', acym_translation('ACYM_DEVICES')); ?> | |
| 170 | - </div> | |
| 171 | - <div class="acym__stats__pie__one-chart cell large-3 medium-6"> | |
| 172 | - <?php acym_pieChart($data['example_source_chart'], '', acym_translation('ACYM_OPENED_WITH')); ?> | |
| 173 | - </div> | |
| 174 | - <div class="cell large-3 hide-for-small-only hide-for-medium-only"></div> | |
| 175 | - <?php } else { ?> | |
| 176 | - <div class="cell large-3 hide-for-small-only hide-for-medium-only"></div> | |
| 177 | - <div class="acym__stats__pie__one-chart cell large-3 medium-6"> | |
| 178 | - <?php acym_pieChart($data['devices'], 'devices', acym_translation('ACYM_DEVICES')); ?> | |
| 179 | - </div> | |
| 180 | - <div class="acym__stats__pie__one-chart cell large-3 medium-6"> | |
| 181 | - <?php acym_pieChart($data['openedWith'], 'opened_with', acym_translation('ACYM_OPENED_WITH')); ?> | |
| 182 | - </div> | |
| 183 | - <div class="cell large-3 hide-for-small-only hide-for-medium-only"></div> | |
| 184 | - <?php } ?> | |
| 185 | - </div> | |
| 186 | - <div class="cell acym__content grid-x"> | |
| 187 | - <h2 class="cell shrink acym__title acym__title__secondary"> | |
| 188 | - <?php echo esc_html(acym_translation('ACYM_OPEN_TIME_CHART')); | |
| 189 | - acym_info(['textShownInTooltip' => 'ACYM_OPEN_TIME_CHART_DESC']); ?> | |
| 190 | - </h2> | |
| 191 | - <?php if ($data['empty_open']) { ?> | |
| 192 | - <h4 class="cell acym__subtitle__stats text-center"><b><?php echo esc_html(acym_translation('ACYM_EMAIL_NOT_OPEN_EXAMPLE_STATS')); ?></b></h4> | |
| 193 | - <?php } ?> | |
| 194 | - <div class="cell grid-x" id="acym__stats__global__open-time"> | |
| 195 | - <input type="hidden" id="acym__stats__global__open-time__data" value="<?php echo esc_attr(json_encode($data['openTime'])); ?>"> | |
| 196 | - <canvas id="chartjs-0" height="400" width="400"></canvas> | |
| 197 | - </div> | |
| 198 | - </div> | |
| 199 | - <div class="cell grid-x acym__content acym__stats__chart__line"> | |
| 200 | - <h2 class="cell acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_OPEN_CLICK_RATE')); ?></h2> | |
| 201 | - <?php if (!$data['mail']->hasStats) { ?> | |
| 202 | - <h4 class="acym__subtitle__stats cell text-center"> | |
| 203 | - <b><?php echo esc_html(acym_translation('ACYM_NO_OPEN_CLICK_DATA_YET')); ?></b> | |
| 204 | - <br> | |
| 205 | - <?php echo esc_html(acym_translation('ACYM_HERE_AN_EXEMPLE_OF_WHAT_YOU_CAN_GET')); ?> | |
| 206 | - </h4> | |
| 207 | - <?php | |
| 208 | - acym_lineChart( | |
| 209 | - $data['example_line_chart']['month'], | |
| 210 | - $data['example_line_chart']['day'], | |
| 211 | - $data['example_line_chart']['hour'], | |
| 212 | - ); | |
| 213 | - } else { | |
| 214 | - if ($data['show_date_filters']) { | |
| 215 | - ?> | |
| 216 | - <div class="cell grid-x margin-bottom-1"> | |
| 217 | - <div class="cell large-auto "></div> | |
| 218 | - <label class="cell grid-x large-3 medium-6 small-12 acym__stats__chart__date "> | |
| 219 | - <p class="cell shrink"><?php echo esc_html(acym_translation('ACYM_START')); ?></p> | |
| 220 | - <input | |
| 221 | - class="acy_date_picker auto cell text-center acym__stats__chart__line__input__date" | |
| 222 | - id="chart__line__start" | |
| 223 | - type="text" | |
| 224 | - data-acym-translate="0" | |
| 225 | - data-start="<?php echo esc_attr($data['mail']->startEndDateHour['start']); ?>"> | |
| 226 | - </label> | |
| 227 | - <label class="cell grid-x large-3 medium-6 small-12 acym__stats__chart__date "> | |
| 228 | - <p class="cell shrink"><?php echo esc_html(acym_translation('ACYM_END')); ?></p> | |
| 229 | - <input | |
| 230 | - class="acy_date_picker auto cell text-center acym__stats__chart__line__input__date" | |
| 231 | - id="chart__line__end" | |
| 232 | - type="text" | |
| 233 | - data-acym-translate="0" | |
| 234 | - data-end="<?php echo esc_attr($data['mail']->startEndDateHour['end']); ?>"> | |
| 235 | - </label> | |
| 236 | - </div> | |
| 237 | - <?php } ?> | |
| 238 | - <div id="acym__stats__chart__line__canvas" class="cell"> | |
| 239 | - <?php acym_lineChart($data['mail']->month, $data['mail']->day, $data['mail']->hour); ?> | |
| 240 | - </div> | |
| 241 | - <?php } ?> | |
| 242 | - </div> | |
| 243 | - </div> | |
| 244 | -</div> | |