| @@ -1,207 +1,0 @@ | ||
| 1 | -<form id="acym_form" action="<?php echo acym_completeLink(acym_getVar('cmd', 'ctrl')); ?>" method="post" name="acyForm" data-abide novalidate> | |
| 2 | - <?php | |
| 3 | - $isEmpty = empty($data['allElements']) && empty($data['search']) && empty($data['tag']) && empty($data['status']); | |
| 4 | - if (!$isEmpty) { | |
| 5 | - $data['toolbar']->displayToolbar($data); | |
| 6 | - } | |
| 7 | - ?> | |
| 8 | - <div id="acym__queue" class="acym__content"> | |
| 9 | - <?php | |
| 10 | - $workflow = $data['workflowHelper']; | |
| 11 | - echo $workflow->displayTabs($this->steps, 'campaigns'); | |
| 12 | - ?> | |
| 13 | - | |
| 14 | - <?php if ($isEmpty) { ?> | |
| 15 | - <div class="grid-x text-center"> | |
| 16 | - <h1 class="acym__listing__empty__title cell"><?php echo acym_translation('ACYM_YOU_DONT_HAVE_ANY_CAMPAIGN_IN_QUEUE'); ?></h1> | |
| 17 | - <h1 class="acym__listing__empty__subtitle cell"><?php echo acym_translation('ACYM_SEND_ONE_AND_SEE_HOW_AMAZING_QUEUE_IS'); ?></h1> | |
| 18 | - </div> | |
| 19 | - <?php } else { ?> | |
| 20 | - <?php if (empty($data['allElements'])) { ?> | |
| 21 | - <h1 class="cell acym__listing__empty__search__title text-center"><?php echo acym_translation('ACYM_NO_RESULTS_FOUND'); ?></h1> | |
| 22 | - <?php } else { ?> | |
| 23 | - <div class="cell grid-x"> | |
| 24 | - <div class="grid-x acym__listing__actions cell auto"> | |
| 25 | - <?php | |
| 26 | - $sendingText = $this->config->get('cron_last', 0) < (time() - 43200) ? 'ACYM_QUEUE_READY' : 'ACYM_SENDING'; | |
| 27 | - | |
| 28 | - echo acym_filterStatus( | |
| 29 | - [ | |
| 30 | - '' => ['ACYM_ALL', $data['numberPerStatus']['all']], | |
| 31 | - 'sending' => [$sendingText, $data['numberPerStatus']['sending']], | |
| 32 | - 'paused' => ['ACYM_PAUSED', $data['numberPerStatus']['paused']], | |
| 33 | - 'automation' => ['ACYM_AUTOMATION', $data['numberPerStatus']['automation']], | |
| 34 | - 'followup' => ['ACYM_FOLLOW_UP', $data['numberPerStatus']['followup']], | |
| 35 | - ], | |
| 36 | - $data['status'], | |
| 37 | - 'cqueue_status' | |
| 38 | - ); | |
| 39 | - ?> | |
| 40 | - </div> | |
| 41 | - </div> | |
| 42 | - <div class="grid-x acym__listing acym__listing__view__cqueue"> | |
| 43 | - <div class="cell grid-x acym__listing__header hide-for-small-only"> | |
| 44 | - <div class="acym__listing__header__title cell medium-auto"> | |
| 45 | - <?php echo acym_translation('ACYM_MAILS'); ?> | |
| 46 | - </div> | |
| 47 | - <div class="acym__listing__header__title cell large-3 hide-for-medium-only text-center"> | |
| 48 | - <?php echo acym_translation('ACYM_RECIPIENTS'); ?> | |
| 49 | - </div> | |
| 50 | - <div class="acym__listing__header__title cell medium-4 text-center"> | |
| 51 | - <?php echo acym_translation('ACYM_STATUS'); ?> | |
| 52 | - </div> | |
| 53 | - <div class="cell medium-2"></div> | |
| 54 | - </div> | |
| 55 | - <?php foreach ($data['allElements'] as $row) { | |
| 56 | - ?> | |
| 57 | - <div data-acy-elementid="<?php echo acym_escape($row->id); ?>" class="cell grid-x acym__listing__row"> | |
| 58 | - <div class="cell medium-auto acym_vcenter"> | |
| 59 | - <div class="acym__listing__title"> | |
| 60 | - <?php | |
| 61 | - $afterName = $row->language; | |
| 62 | - if (!empty($row->sending_params['abtest'])) { | |
| 63 | - $afterName = $row->subject; | |
| 64 | - } elseif (!empty($data['languages'][$row->language])) { | |
| 65 | - $afterName = $data['languages'][$row->language]->name; | |
| 66 | - } | |
| 67 | - $afterName = empty($afterName) ? '' : ' - '.$afterName | |
| 68 | - ?> | |
| 69 | - <h6 class="acym__listing__title__primary acym_text_ellipsis"><?php echo acym_escape($row->name.$afterName); ?></h6> | |
| 70 | - <span class="acym__listing__title__secondary acym_text_ellipsis"><?php echo acym_escape($row->subject); ?></span> | |
| 71 | - <p class="acym__listing__title__secondary"> | |
| 72 | - <?php echo acym_date($row->sending_date, acym_getDateTimeFormat()); ?> | |
| 73 | - </p> | |
| 74 | - </div> | |
| 75 | - </div> | |
| 76 | - <div class="cell large-3 hide-for-medium-only hide-for-small-only text-center"> | |
| 77 | - <div class="queue_lists"> | |
| 78 | - <?php | |
| 79 | - if (!$row->iscampaign) { | |
| 80 | - echo $row->lists; | |
| 81 | - } else { | |
| 82 | - $i = 0; | |
| 83 | - $class = 'acym_subscription acymicon-circle'; | |
| 84 | - foreach ($row->lists as $oneList) { | |
| 85 | - if ($i == 6) { | |
| 86 | - echo acym_tooltip( | |
| 87 | - [ | |
| 88 | - 'hoveredText' => '<i data-campaign="'.$row->id.'" class="acym_subscription acymicon-add"></i>', | |
| 89 | - 'textShownInTooltip' => acym_translation('ACYM_SHOW_ALL_LISTS'), | |
| 90 | - ] | |
| 91 | - ); | |
| 92 | - $class .= ' is-hidden'; | |
| 93 | - } | |
| 94 | - echo acym_tooltip( | |
| 95 | - [ | |
| 96 | - 'hoveredText' => '<i class="'.$class.'" style="color:'.$oneList->color.'"></i>', | |
| 97 | - 'textShownInTooltip' => $oneList->name, | |
| 98 | - ] | |
| 99 | - ); | |
| 100 | - $i++; | |
| 101 | - } | |
| 102 | - } | |
| 103 | - ?> | |
| 104 | - </div> | |
| 105 | - <?php | |
| 106 | - if (!empty($row->recipients)) { | |
| 107 | - echo acym_translationSprintf('ACYM_X_RECIPIENTS', '<strong>'.number_format($row->recipients, 0, '.', ' ').'</strong>'); | |
| 108 | - } | |
| 109 | - ?> | |
| 110 | - </div> | |
| 111 | - <div class="cell medium-4 small-9"> | |
| 112 | - <div class="acym_vcenter grid-x text-center"> | |
| 113 | - <?php | |
| 114 | - if (!$row->iscampaign) { | |
| 115 | - $text = acym_translation('ACYM_SCHEDULED'); | |
| 116 | - $class = 'acym_status_scheduled'; | |
| 117 | - } elseif ($row->active == 0) { | |
| 118 | - $text = acym_translation('ACYM_PAUSED'); | |
| 119 | - $class = 'acym_status_paused'; | |
| 120 | - } else { | |
| 121 | - if ($this->config->get('cron_last', 0) < (time() - 43200)) { | |
| 122 | - $text = acym_translation('ACYM_QUEUE_READY'); | |
| 123 | - $class = 'acym_status_ready'; | |
| 124 | - } else { | |
| 125 | - $text = acym_translation('ACYM_QUEUE_SENDING'); | |
| 126 | - $class = 'acym_status_sending'; | |
| 127 | - } | |
| 128 | - } | |
| 129 | - ?> | |
| 130 | - | |
| 131 | - <div class="cell"> | |
| 132 | - <div class="progress_bar <?php echo $class; ?>"> | |
| 133 | - <?php | |
| 134 | - $percentageSent = 0; | |
| 135 | - if (!empty($row->nbqueued) && $row->iscampaign) { | |
| 136 | - if (!empty($row->recipients)) { | |
| 137 | - $percentageSent = 100 - ceil($row->nbqueued * 100 / $row->recipients); | |
| 138 | - } | |
| 139 | - echo '<div class="progress_bar_left" style="width: '.$percentageSent.'%;"></div>'; | |
| 140 | - } | |
| 141 | - ?> | |
| 142 | - <div class="progress_bar_text grid-x"> | |
| 143 | - <span class="cell auto acym_text_ellipsis"><?php echo $text; ?></span> | |
| 144 | - <?php | |
| 145 | - if (!empty($row->nbqueued) && $row->iscampaign) { | |
| 146 | - echo '<span class="cell" style="width: 40px;">'.$percentageSent.'%</span>'; | |
| 147 | - } | |
| 148 | - ?> | |
| 149 | - </div> | |
| 150 | - </div> | |
| 151 | - </div> | |
| 152 | - | |
| 153 | - <?php if ($row->active == 1) { ?> | |
| 154 | - <div class="cell acym_sendnow"> | |
| 155 | - | |
| 156 | - <?php | |
| 157 | - $sendID = 'send_campaign_'.$row->id; | |
| 158 | - echo acym_modal( | |
| 159 | - '<i class="acymicon-paper-plane" data-acy-elementid="'.$row->id.'"></i> '.acym_translation('ACYM_SEND_NOW'), | |
| 160 | - '', | |
| 161 | - null, | |
| 162 | - 'data-reveal-larger', | |
| 163 | - 'data-reload="true" data-ajax="true" data-iframe="&ctrl=queue&task=continuesend&id='.$row->id.'&totalsend='.$row->nbqueued.'"' | |
| 164 | - ); | |
| 165 | - ?> | |
| 166 | - </div> | |
| 167 | - <?php } ?> | |
| 168 | - </div> | |
| 169 | - </div> | |
| 170 | - <div class="cell medium-2 small-3"> | |
| 171 | - <div class="acym_vcenter"> | |
| 172 | - <?php | |
| 173 | - | |
| 174 | - echo '<div class="acym_action_buttons">'; | |
| 175 | - | |
| 176 | - $cancelText = 'ACYM_CANCEL_SCHEDULING'; | |
| 177 | - if (!empty($row->nbqueued) && $row->iscampaign) { | |
| 178 | - $class = $row->active == 0 ? 'acymicon-play-circle-filled' : 'acymicon-pause-circle'; | |
| 179 | - echo acym_tooltip([ | |
| 180 | - 'hoveredText' => '<i campaignid="'.$row->campaign.'" class="'.$class.' acym__queue__play_pause__button"></i>', | |
| 181 | - 'textShownInTooltip' => acym_translation($row->active == 0 ? 'ACYM_UNPAUSE_CAMPAIGN' : 'ACYM_PAUSE_CAMPAIGN'), | |
| 182 | - ]); | |
| 183 | - $cancelText = 'ACYM_CANCEL_CAMPAIGN'; | |
| 184 | - } | |
| 185 | - | |
| 186 | - echo acym_tooltip( | |
| 187 | - [ | |
| 188 | - 'hoveredText' => '<i class="acymicon-times-circle acym__queue__cancel__button" mailid="'.$row->id.'"></i>', | |
| 189 | - 'textShownInTooltip' => acym_translation($cancelText), | |
| 190 | - ] | |
| 191 | - ); | |
| 192 | - echo '</div>'; | |
| 193 | - ?> | |
| 194 | - </div> | |
| 195 | - </div> | |
| 196 | - </div> | |
| 197 | - <?php } ?> | |
| 198 | - </div> | |
| 199 | - <?php echo $data['pagination']->display('cqueue'); ?> | |
| 200 | - <?php } ?> | |
| 201 | - <?php } ?> | |
| 202 | - <?php acym_formOptions(); ?> | |
| 203 | - <input type="hidden" name="acym__queue__cancel__mail_id"> | |
| 204 | - <input type="hidden" name="acym__queue__play_pause__campaign_id"> | |
| 205 | - <input type="hidden" name="acym__queue__play_pause__active__new_value"> | |
| 206 | - </div> | |
| 207 | -</form> | |