| 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 acym__listing"> |
| 6 |
<?php foreach ($data['unsubscribe'] as $oneUnsubscription) { ?> |
| 7 |
<div class="grid-x cell align-middle acym__listing__row"> |
| 8 |
<div class="grid-x small-6 large-8 cell acym__users__display__list__name"> |
| 9 |
<?php echo '<i class="cell shrink acymicon-circle" style="color:'.esc_attr($oneUnsubscription->color ?? '#0079d3').'"></i>'; ?> |
| 10 |
<h6 class="cell auto"><?php echo esc_html($oneUnsubscription->name); ?></h6> |
| 11 |
<span class="cell medium-auto"> |
| 12 |
<?php |
| 13 |
if (!acym_isDateValid($oneUnsubscription->subscription_date)) { |
| 14 |
$subscriptionDate = acym_translation('ACYM_NEVER_SUBSCRIBED'); |
| 15 |
} else { |
| 16 |
$subscriptionDate = acym_date($oneUnsubscription->subscription_date, acym_translation('ACYM_DATE_FORMAT_LC2')); |
| 17 |
} |
| 18 |
if (!acym_isDateValid($oneUnsubscription->unsubscribe_date)) { |
| 19 |
$unsubscribeDate = acym_translation('ACYM_INVALID_DATE'); |
| 20 |
} else { |
| 21 |
$unsubscribeDate = acym_date($oneUnsubscription->unsubscribe_date, acym_translation('ACYM_DATE_FORMAT_LC2')); |
| 22 |
} |
| 23 |
echo esc_html(acym_translationSprintf('ACYM_SUBSCRIPTION_DATES', $subscriptionDate, $unsubscribeDate)); |
| 24 |
?> |
| 25 |
</span> |
| 26 |
</div> |
| 27 |
<div acym-data-id="<?php echo intval($oneUnsubscription->id); ?>" |
| 28 |
class="cell small-3 medium-auto margin-right-1 acym__users__display__list--action acym__user__action--reset"> |
| 29 |
<i class="acymicon-delete"></i> |
| 30 |
<span><?php echo esc_html(acym_strtolower(acym_translation('ACYM_RESET'))); ?></span> |
| 31 |
</div> |
| 32 |
<div acym-data-id="<?php echo intval($oneUnsubscription->id); ?>" |
| 33 |
class="cell small-3 medium-shrink acym__users__display__list--action acym__user__action--subscribe acym__color__dark-gray"> |
| 34 |
<i class="acymicon-add"></i> |
| 35 |
<span><?php echo esc_html(acym_strtolower(acym_translation('ACYM_RESUBSCRIBE'))); ?></span> |
| 36 |
</div> |
| 37 |
</div> |
| 38 |
<?php } ?> |
| 39 |
</div> |
| 40 |
|