| 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 |
<form id="acym_form" action="<?php echo esc_url(acym_completeLink(acym_getVar('cmd', 'ctrl'))); ?>" method="post" name="acyForm" data-abide novalidate> |
| 6 |
<?php |
| 7 |
$isEmpty = empty($data['allElements']) && empty($data['search']) && empty($data['tag']) && empty($data['status']); |
| 8 |
if (!$isEmpty) { |
| 9 |
$data['toolbar']->displayToolbar($data); |
| 10 |
} |
| 11 |
?> |
| 12 |
<div id="acym__queue" class="acym__content"> |
| 13 |
<?php |
| 14 |
$workflow = $data['workflowHelper']; |
| 15 |
$workflow->displayTabs($this->steps, 'scheduled'); |
| 16 |
?> |
| 17 |
|
| 18 |
<?php if ($isEmpty) { ?> |
| 19 |
<div class="grid-x text-center"> |
| 20 |
<h1 class="acym__listing__empty__title cell"><?php echo esc_html(acym_translation('ACYM_YOU_DONT_HAVE_ANY_CAMPAIGN_IN_QUEUE')); ?></h1> |
| 21 |
<h1 class="acym__listing__empty__subtitle cell"><?php echo esc_html(acym_translation('ACYM_SEND_ONE_AND_SEE_HOW_AMAZING_QUEUE_IS')); ?></h1> |
| 22 |
</div> |
| 23 |
<?php } else { ?> |
| 24 |
<?php if (empty($data['allElements'])) { ?> |
| 25 |
<h1 class="cell acym__listing__empty__search__title text-center"><?php echo esc_html(acym_translation('ACYM_NO_RESULTS_FOUND')); ?></h1> |
| 26 |
<?php } else { ?> |
| 27 |
<div class="grid-x acym__listing acym__listing__view__squeue"> |
| 28 |
<div class="cell grid-x acym__listing__header hide-for-small-only"> |
| 29 |
<div class="acym__listing__header__title cell medium-auto"> |
| 30 |
<?php echo esc_html(acym_translation('ACYM_MAILS')); ?> |
| 31 |
</div> |
| 32 |
<div class="acym__listing__header__title cell large-3 hide-for-medium-only text-center"> |
| 33 |
<?php echo esc_html(acym_translation('ACYM_RECIPIENTS')); ?> |
| 34 |
</div> |
| 35 |
<div class="acym__listing__header__title cell medium-4 text-center"> |
| 36 |
<?php echo esc_html(acym_translation('ACYM_SENDING_DATE')); ?> |
| 37 |
</div> |
| 38 |
<div class="cell medium-2"></div> |
| 39 |
</div> |
| 40 |
<?php foreach ($data['allElements'] as $row) { |
| 41 |
?> |
| 42 |
<div data-acy-elementid="<?php echo esc_attr($row->id); ?>" class="cell grid-x acym__listing__row"> |
| 43 |
<div class="cell medium-auto acym_vcenter"> |
| 44 |
<div class="acym__listing__title"> |
| 45 |
<?php |
| 46 |
$afterName = $row->language; |
| 47 |
if (!empty($row->sending_params['abtest'])) { |
| 48 |
$afterName = $row->subject; |
| 49 |
} elseif (!empty($data['languages'][$row->language])) { |
| 50 |
$afterName = $data['languages'][$row->language]->name; |
| 51 |
} |
| 52 |
$afterName = empty($afterName) ? '' : ' - '.$afterName |
| 53 |
?> |
| 54 |
<h6 class="acym__listing__title__primary acym_text_ellipsis"><?php echo esc_html($row->name.$afterName); ?></h6> |
| 55 |
<span class="acym__listing__title__secondary acym_text_ellipsis"><?php echo esc_html($row->subject); ?></span> |
| 56 |
</div> |
| 57 |
</div> |
| 58 |
<div class="cell large-3 hide-for-medium-only hide-for-small-only text-center"> |
| 59 |
<div class="queue_lists"> |
| 60 |
<?php |
| 61 |
$i = 0; |
| 62 |
$class = 'acym_subscription acymicon-circle'; |
| 63 |
foreach ($row->lists as $oneList) { |
| 64 |
if ($i === 6) { |
| 65 |
acym_tooltip( |
| 66 |
[ |
| 67 |
'hoveredText' => '<i data-campaign="'.$row->id.'" class="acym_subscription acymicon-add"></i>', |
| 68 |
'textShownInTooltip' => acym_translation('ACYM_SHOW_ALL_LISTS'), |
| 69 |
] |
| 70 |
); |
| 71 |
$class .= ' is-hidden'; |
| 72 |
} |
| 73 |
acym_tooltip( |
| 74 |
[ |
| 75 |
'hoveredText' => '<i class="'.esc_attr($class).'" style="color:'.esc_attr($oneList->color ?? '#0079d3').'"></i>', |
| 76 |
'textShownInTooltip' => $oneList->name, |
| 77 |
] |
| 78 |
); |
| 79 |
$i++; |
| 80 |
} |
| 81 |
?> |
| 82 |
</div> |
| 83 |
</div> |
| 84 |
<div class="cell medium-4 small-9"> |
| 85 |
<?php echo esc_html(acym_date($row->sending_date, acym_getDateTimeFormat())); ?> |
| 86 |
</div> |
| 87 |
<div class="cell medium-2 small-3"> |
| 88 |
<div class="acym_vcenter"> |
| 89 |
<?php |
| 90 |
// Now display the action buttons |
| 91 |
echo '<div class="acym_action_buttons">'; |
| 92 |
acym_tooltip( |
| 93 |
[ |
| 94 |
'hoveredText' => '<i class="acymicon-times-circle acym__queue__cancel__button" mailid="'.$row->id.'"></i>', |
| 95 |
'textShownInTooltip' => acym_translation('ACYM_CANCEL_SCHEDULING'), |
| 96 |
] |
| 97 |
); |
| 98 |
echo '</div>'; |
| 99 |
?> |
| 100 |
</div> |
| 101 |
</div> |
| 102 |
</div> |
| 103 |
<?php } ?> |
| 104 |
</div> |
| 105 |
<?php $data['pagination']->display('squeue'); ?> |
| 106 |
<?php } ?> |
| 107 |
<?php } ?> |
| 108 |
<?php acym_formOptions(true, 'scheduled'); ?> |
| 109 |
<input type="hidden" name="acym__queue__cancel__mail_id"> |
| 110 |
</div> |
| 111 |
</form> |
| 112 |
|