PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / trunk
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress vtrunk
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 / Forms / tmpl / listing_listing.php

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

125 lines 6.1 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['allForms'])) { ?>
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 'delete' => acym_translation('ACYM_DELETE'),
14 ];
15 acym_listingActions($actions);
16 ?>
17 </div>
18 <div class="grid-x cell align-justify">
19 <div class="cell grid-x large-shrink acym_vcenter">
20 <?php
21 $options = [
22 '' => ['ACYM_ALL', $data['formsNumberPerStatus']['all']],
23 'active' => ['ACYM_ACTIVE', $data['formsNumberPerStatus']['active']],
24 'inactive' => ['ACYM_INACTIVE', $data['formsNumberPerStatus']['inactive']],
25 ];
26 acym_filterStatus($options, $data['status'], 'forms_status');
27 ?>
28 </div>
29 <div class="cell large-shrink acym_listing_sort-by">
30 <?php acym_sortBy(
31 [
32 'id' => acym_strtolower(acym_translation('ACYM_ID')),
33 'name' => acym_translation('ACYM_NAME'),
34 'active' => acym_translation('ACYM_ACTIVE'),
35 'type' => acym_translation('ACYM_TYPE'),
36 ],
37 'forms',
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="large-2 medium-2 hide-for-small-only cell acym__listing__header__title">
54 <?php echo esc_html(acym_translation('ACYM_DATE_CREATED')); ?>
55 </div>
56 <div class="auto hide-for-small-only cell acym__listing__header__title">
57 <?php echo esc_html(acym_translation('ACYM_TYPE')); ?>
58 </div>
59 <?php if (ACYM_CMS == 'wordpress') { ?>
60 <div class="large-2 medium-2 hide-for-small-only cell acym__listing__header__title">
61 <?php echo esc_html(acym_translation('ACYM_SHORTCODE')); ?>
62 </div>
63 <?php } ?>
64 <div class="large-1 medium-1 text-center hide-for-small-only cell acym__listing__header__title">
65 <?php echo esc_html(acym_translation('ACYM_ACTIVE')); ?>
66 </div>
67 <div class="large-1 medium-1 text-center hide-for-small-only cell acym__listing__header__title">
68 <?php echo esc_html(acym_translation('ACYM_ID')); ?>
69 </div>
70 </div>
71 </div>
72 <?php foreach ($data['allForms'] as $form) { ?>
73 <div data-acy-elementid="<?php echo esc_attr($form->id); ?>" class="grid-x cell align-middle acym__listing__row">
74 <div class="medium-shrink small-1 cell">
75 <input id="checkbox_<?php echo esc_attr($form->id); ?>" type="checkbox" name="elements_checked[]" value="<?php echo esc_attr($form->id); ?>">
76 </div>
77 <div class="grid-x medium-auto small-11 cell acym__listing__title__container">
78 <div class="grid-x large-4 medium-4 small-11 cell acym__listing__title">
79 <a class="cell" href="<?php echo esc_url(acym_completeLink('forms&task=edit&step=info&id='.intval($form->id))); ?>">
80 <h6 class="acym__listing__title__important"><?php echo esc_html($form->name); ?></h6>
81 </a>
82 </div>
83 <div class="cell large-2 medium-2 hide-for-small-only">
84 <?php
85 acym_tooltip(
86 [
87 'hoveredText' => acym_date(
88 $form->creation_date,
89 acym_getDateTimeFormat('ACYM_DATE_FORMAT_LC5'),
90 false
91 ),
92 'textShownInTooltip' => $form->creation_date,
93 ]
94 );
95 ?>
96 </div>
97 <div class="cell auto hide-for-small-only">
98 <?php echo esc_html(array_key_exists($form->type, $data['formTypes']) ? $data['formTypes'][$form->type] : $form->type); ?>
99 </div>
100 <?php if (ACYM_CMS === 'wordpress') { ?>
101 <div class="cell medium-2 hide-for-small-only">
102 <?php echo $form->type === $data['formClass']::SUB_FORM_TYPE_SHORTCODE ? '[acymailing_form_shortcode id="'.esc_html($form->id).'"]' : '-'; ?>
103 </div>
104 <?php } ?>
105 <div class="cell small-1 acym__listing__controls text-center">
106 <?php
107 $class = $form->active == 1 ? 'acymicon-check-circle acym__color__green' : 'acymicon-times-circle acym__color__red';
108 $newvalue = $form->active == 1 ? 0 : 1;
109 echo '<i data-acy-table="form"
110 data-acy-field="active"
111 data-acy-elementid="'.esc_attr($form->id).'"
112 data-acy-newvalue="'.esc_attr($newvalue).'"
113 class="acym_toggleable '.esc_attr($class).'"></i>';
114 ?>
115 </div>
116 <div class="cell medium-1 hide-for-small-only text-center">
117 <?php echo esc_html($form->id); ?>
118 </div>
119 </div>
120 </div>
121 <?php } ?>
122 <?php $data['pagination']->display('form'); ?>
123 </div>
124 <?php } ?>
125