PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.0.1
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.0.1
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 / Segments / tmpl / listing_listing.php

listing_listing.php in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress 11.0.1, at back/Views/Segments/tmpl/listing_listing.php

107 lines 5.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['segments'])) { ?>
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 grid-x margin-top-1">
8 <div class="grid-x acym__listing__actions cell margin-bottom-1">
9 <?php
10 $actions = [
11 'setActive' => acym_translation('ACYM_ENABLE'),
12 'setInactive' => acym_translation('ACYM_DISABLE'),
13 'duplicate' => acym_translation('ACYM_DUPLICATE'),
14 'delete' => acym_translation('ACYM_DELETE'),
15 ];
16 acym_listingActions($actions);
17 ?>
18 </div>
19 <div class="cell grid-x align-justify">
20 <div class="cell grid-x large-shrink acym_vcenter">
21 <?php
22 $options = [
23 '' => ['ACYM_ALL', $data['segmentsNumberPerStatus']['all']],
24 'active' => ['ACYM_ACTIVE', $data['segmentsNumberPerStatus']['active']],
25 'inactive' => ['ACYM_INACTIVE', $data['segmentsNumberPerStatus']['inactive']],
26 ];
27 acym_filterStatus($options, $data['status'], 'segments_status');
28 ?>
29 </div>
30 <div class="cell large-shrink acym_listing_sort-by">
31 <?php acym_sortBy(
32 [
33 'id' => acym_strtolower(acym_translation('ACYM_ID')),
34 'name' => acym_translation('ACYM_NAME'),
35 'active' => acym_translation('ACYM_ACTIVE'),
36 ],
37 'segments',
38 $data['ordering'],
39 $data['orderingSortOrder']
40 ); ?>
41 </div>
42 </div>
43 </div>
44 <div class="grid-x acym__listing">
45 <div class="grid-x cell acym__listing__header">
46 <div class="medium-shrink small-1 cell">
47 <input id="checkbox_all" type="checkbox" name="checkbox_all">
48 </div>
49 <div class="grid-x medium-auto small-11 cell acym__listing__header__title__container">
50 <div class="large-4 medium-4 cell acym__listing__header__title">
51 <?php echo esc_html(acym_translation('ACYM_NAME')); ?>
52 </div>
53 <div class="auto hide-for-small-only cell acym__listing__header__title">
54 <?php echo esc_html(acym_translation('ACYM_DATE_CREATED')); ?>
55 </div>
56 <div class="large-1 medium-1 text-center hide-for-small-only cell acym__listing__header__title">
57 <?php echo esc_html(acym_translation('ACYM_ACTIVE')); ?>
58 </div>
59 <div class="large-1 medium-1 text-center hide-for-small-only cell acym__listing__header__title">
60 <?php echo esc_html(acym_translation('ACYM_ID')); ?>
61 </div>
62 </div>
63 </div>
64 <?php foreach ($data['segments'] as $segment) { ?>
65 <div data-acy-elementid="<?php echo esc_attr($segment->id); ?>" class="grid-x cell align-middle acym__listing__row">
66 <div class="medium-shrink small-1 cell">
67 <input id="checkbox_<?php echo esc_attr($segment->id); ?>" type="checkbox" name="elements_checked[]" value="<?php echo esc_attr($segment->id); ?>">
68 </div>
69 <div class="grid-x medium-auto small-11 cell acym__listing__title__container">
70 <div class="grid-x large-4 medium-4 small-11 cell acym__listing__title">
71 <a class="cell" href="<?php echo esc_url(acym_completeLink('segments&task=edit&segmentId='.intval($segment->id))); ?>">
72 <h6 class="acym__listing__title__important"><?php echo esc_html($segment->name); ?></h6>
73 </a>
74 </div>
75 <div class="cell auto hide-for-small-only">
76 <?php
77 acym_tooltip(
78 [
79 'hoveredText' => acym_date(
80 $segment->creation_date,
81 acym_getDateTimeFormat('ACYM_DATE_FORMAT_LC5'),
82 false
83 ),
84 'textShownInTooltip' => $segment->creation_date,
85 ]
86 );
87 ?>
88 </div>
89 <div class="cell small-1 acym__listing__controls text-center">
90 <?php
91 $class = $segment->active == 1 ? 'acymicon-check-circle acym__color__green' : 'acymicon-times-circle acym__color__red';
92 $newvalue = $segment->active == 1 ? 0 : 1;
93 echo '<i data-acy-table="segment" data-acy-field="active" data-acy-elementid="'.esc_attr($segment->id).'" data-acy-newvalue="'.esc_attr($newvalue).'" class="acym_toggleable '.esc_attr(
94 $class
95 ).'"></i>';
96 ?>
97 </div>
98 <div class="cell medium-1 hide-for-small-only text-center">
99 <?php echo esc_html($segment->id); ?>
100 </div>
101 </div>
102 </div>
103 <?php } ?>
104 <?php $data['pagination']->display('segments'); ?>
105 </div>
106 <?php } ?>
107