PluginProbe ʕ •ᴥ•ʔ
Hustle – Email Marketing, Lead Generation, Optins, Popups / 7.8.9
Hustle – Email Marketing, Lead Generation, Optins, Popups v7.8.9
7.8.13 7.8.13.1 trunk 3.0 3.1 3.1.1 3.1.2 3.1.3 3.1.4 4.3.2 4.4.4 4.4.5 4.4.5.1 4.4.5.4 4.6 4.6.1.1 4.6.1.4 4.7.0.2 4.7.0.3 4.7.0.7 4.7.0.9 4.7.1.0 4.7.1.1 4.8.0.0 5.0.0 5.0.1 5.0.1.1 5.0.1.2 5.1 5.1.1 5.1.2 5.1.3 5.1.3.1 5.1.3.2 5.1.4 5.1.5 6.0 6.0.1 6.0.2 6.0.3 6.0.4.2 6.0.5 6.0.6.1 6.0.7 6.0.8.1 6.0.9 7.0.0.1 7.0.2 7.0.3 7.0.4 7.1.0 7.1.1 7.2.0 7.2.1 7.3.0 7.3.1 7.3.3 7.3.5 7.3.6 7.3.7 7.4.0 7.4.1 7.4.11 7.4.13 7.4.13.1 7.4.2 7.4.3 7.4.4 7.4.5 7.4.5.1 7.4.5.2 7.4.6 7.4.7 7.5.0 7.6.0 7.6.1 7.6.3 7.6.4 7.6.6 7.7.0 7.7.1 7.8.0 7.8.1 7.8.10 7.8.10.1 7.8.10.2 7.8.11 7.8.12 7.8.12.1 7.8.2 7.8.3 7.8.4 7.8.5 7.8.6 7.8.7 7.8.8 7.8.9 7.8.9.1 7.8.9.2 7.8.9.3
wordpress-popup / views / admin / email-lists / emails-list.php
wordpress-popup / views / admin / email-lists Last commit date
dialog-filter.php 3 years ago emails-list.php 9 months ago pagination-desktop.php 3 years ago pagination-mobile.php 5 years ago search-bar.php 3 years ago
emails-list.php
397 lines
1 <?php
2 /**
3 * Title section.
4 *
5 * @var Hustle_Layout_Helper $this
6 *
7 * @package Hustle
8 * @since 4.0.0
9 */
10
11 // ELEMENT: Pagination (Mobile).
12 ?>
13 <div class="hui-pagination hui-pagination-mobile">
14 <?php $this->render( 'admin/email-lists/pagination-mobile' ); ?>
15 </div>
16
17 <div class="sui-box">
18
19 <?php
20 $items = count( $this->admin->entries_iterator() );
21 // Filter Bar.
22 $this->render(
23 'admin/email-lists/pagination-desktop',
24 array( 'is_bottom' => false )
25 );
26 ?>
27
28 <table class="hui-table-entries sui-table sui-table-flushed<?php echo $items ? ' sui-accordion' : ''; ?>">
29
30 <thead>
31
32 <tr>
33
34 <th class="hui-column-id">
35 <label for="hustle-check-all-top" class="sui-checkbox sui-checkbox-sm">
36 <input type="checkbox" id="hustle-check-all-top" class="hustle-check-all">
37 <span aria-hidden="true"></span>
38 <span><?php esc_html_e( 'Id', 'hustle' ); ?></span>
39 </label>
40 </th>
41
42 <?php
43 $fields_mappers = $this->admin->get_fields_mappers();
44 // Start from 1, since first one is ID.
45 // Length is 3 because we only display the 4 common columns.
46 $fields_headers = array_slice( $fields_mappers, 1, 3 );
47
48 $fields_left = count( $fields_mappers ) - count( $fields_headers );
49 if ( 0 > $fields_left ) {
50 $fields_left = 0;
51 }
52 $fields_left = count( $fields_mappers ) - count( $fields_headers );
53
54 foreach ( $fields_headers as $header ) :
55 ?>
56
57 <th <?php echo isset( $header['class'] ) ? ' class="' . esc_attr( $header['class'] ) . '"' : ''; ?>><?php echo esc_html( $header['label'] ); ?></th>
58
59 <?php endforeach; ?>
60
61 <th data-num-hidden-fields="<?php echo esc_attr( $fields_left ); ?>"><span class="sui-screen-reader-text"><?php esc_html_e( 'Number of hidden fields', 'hustle' ); ?></span></th>
62
63 </tr>
64
65 </thead>
66
67 <tbody class="hustle-list">
68
69 <?php if ( $no_local_list ) { ?>
70 <tr><td role="alert" class="hui-entries-alert" colspan="5">
71 <p>
72 <span class="sui-icon-loader sui-loading" aria-hidden="true"></span>
73 <span class="sui-screen-reader-text"><?php echo wp_kses_post( $add_local_list ); ?></span>
74 </p>
75 </td></tr>
76 <?php } ?>
77
78 <?php
79 if ( $items ) :
80
81 foreach ( $this->admin->entries_iterator() as $entry ) :
82
83 $entry_id = $entry['id'];
84 $db_entry_id = $entry['entry_id'];
85
86 $summary = $entry['summary'];
87 $summary_items = $summary['items'];
88
89 $detail = $entry['detail'];
90 $detail_items = $detail['items'];
91
92 $addons = $entry['addons'];
93 ?>
94
95 <tr class="sui-accordion-item" data-entry-id="<?php echo esc_attr( $db_entry_id ); ?>">
96
97 <?php foreach ( $summary_items as $key => $summary_item ) : ?>
98
99 <?php if ( 1 === $summary_item['colspan'] ) : ?>
100
101 <td class="hui-column-id sui-accordion-item-title">
102
103 <label class="sui-checkbox sui-checkbox-sm">
104 <input
105 type="checkbox"
106 name="ids[]"
107 value="<?php echo esc_attr( $db_entry_id ); ?>"
108 id="email-entry-<?php echo esc_attr( $db_entry_id ); ?>"
109 class="hustle-listing-checkbox"
110 />
111 <span aria-hidden="true"></span>
112 <?php /* translators: entry id */ ?>
113 <span><?php printf( esc_html__( '%2$sSelect entry number%3$s%1$s', 'hustle' ), esc_attr( $db_entry_id ), '<span class="sui-screen-reader-text">', '</span>' ); ?></span>
114 </label>
115
116 </td>
117
118 <?php else : ?>
119
120 <?php if ( 'hui-column-date' === $summary_item['class'] ) { ?>
121 <td class="hui-column-date">
122 <?php echo esc_html( $summary_item['value'] ); ?>
123 <span class="sui-accordion-open-indicator" aria-hidden="true">
124 <span class="sui-icon-chevron-down" aria-hidden="true"></span>
125 <span class="sui-screen-reader-text"><?php esc_html_e( 'Click to open', 'hustle' ); ?></span>
126 </span>
127 </td>
128 <?php } else { ?>
129 <td
130 <?php
131 if ( ! empty( $summary_item['class'] ) ) {
132 echo ' class="' . esc_attr( $summary_item['class'] ) . '"';}
133 ?>
134 ><?php echo esc_html( $summary_item['value'] ); ?></td>
135 <?php } ?>
136
137 <?php endif; ?>
138
139 <?php if ( ! $summary['num_fields_left'] && ( count( $summary_items ) - 1 ) === $key ) : ?>
140
141 <td><span class="hui-entry-button sui-accordion-open-indicator">
142 <span class="sui-icon-chevron-down" aria-hidden="true"></span>
143 <span class="sui-screen-reader-text"><?php esc_html_e( 'Click to open', 'hustle' ); ?></span>
144 </span></td>
145
146 <?php endif; ?>
147
148 <?php endforeach; ?>
149
150 <?php if ( $summary['num_fields_left'] ) : ?>
151
152 <td><?php /* translators: remaining fields */ printf( esc_html__( '+ %s other fields', 'hustle' ), esc_html( $summary['num_fields_left'] ) ); ?>
153 <span class="sui-accordion-open-indicator">
154 <span class="sui-icon-chevron-down" aria-hidden="true"></span>
155 <span class="sui-screen-reader-text"><?php esc_html_e( 'Click to open', 'hustle' ); ?></span>
156 </span></td>
157
158 <?php endif; ?>
159
160 </tr>
161
162 <tr class="sui-accordion-item-content">
163
164 <td colspan="<?php echo esc_attr( $detail['colspan'] ); ?>">
165
166 <div class="sui-box">
167
168 <div class="sui-box-body">
169
170 <h2>#<?php echo esc_html( $db_entry_id ); ?></h2>
171
172 <div class="sui-box-settings-row sui-flushed">
173
174 <div class="sui-box-settings-col-2">
175
176 <ul class="hui-list">
177
178 <?php foreach ( $detail_items as $detail_item ) : ?>
179
180 <li>
181 <strong><?php echo esc_html( $detail_item['label'] ); ?></strong>
182
183 <?php $sub_entries = $detail_item['sub_entries']; ?>
184
185 <?php if ( empty( $sub_entries ) ) { ?>
186 <span class="sui-list-detail"
187 style="margin-top: 0;">
188 <?php echo wp_kses_post( $detail_item['value'] ); ?>
189 </span>
190 <?php
191 } else {
192 foreach ( $sub_entries as $sub_entry ) {
193 ?>
194 <div class="sui-form-field">
195 <span class="sui-settings-label"><?php echo esc_html( $sub_entry['label'] ); ?></span>
196 <span class="sui-list-detail"><?php echo wp_kses_post( $sub_entry['value'] ); ?></span>
197 </div>
198 <?php
199 }
200 }
201 ?>
202
203
204 </li>
205
206 <?php endforeach; ?>
207
208 </ul>
209
210 </div>
211
212 </div>
213
214 <?php if ( ! empty( $addons ) ) : ?>
215
216 <div class="sui-box-settings-row">
217
218 <div class="sui-box-settings-col-2">
219
220 <h3><?php esc_html_e( 'Active Integrations', 'hustle' ); ?></h3>
221
222 <p><?php esc_html_e( 'You can check if the data is submitted to your active integrations and the information returned by the integrations if any.', 'hustle' ); ?></p>
223
224 <table class="sui-table sui-accordion hui-table-entries-app">
225
226 <thead>
227
228 <tr>
229
230 <th class="hui-column-name"><?php esc_html_e( 'Integration Name', 'hustle' ); ?></th>
231 <th class="hui-column-data"><?php esc_html_e( 'Data sent to integration', 'hustle' ); ?></th>
232
233 </tr>
234
235 </thead>
236
237 <tbody>
238
239 <?php
240 $num = 0;
241 $num_addons = count( $addons );
242
243 foreach ( $addons as $addon ) :
244 ?>
245
246 <tr class="sui-accordion-item<?php echo ( ++$num === $num_addons ) ? ' sui-table-item-last' : ''; ?> <?php echo ( $addon['summary']['data_sent'] ) ? 'sui-success' : 'sui-error'; ?>">
247
248 <td class="hui-column-name sui-accordion-item-title" style="padding-bottom: 5px;">
249
250 <img
251 src="<?php echo esc_url( $addon['summary']['icon'] ); ?>"
252 aria-hidden="true"
253 />
254
255 <span><?php echo esc_attr( $addon['summary']['name'] ); ?></span>
256
257 </td>
258
259 <td class="hui-column-data" style="padding-bottom: 5px;">
260
261 <div class="hui-column-data--alignment">
262
263 <div class="hui-column-data--left"><?php $addon['summary']['data_sent'] ? esc_html_e( 'Yes', 'hustle' ) : esc_html_e( 'No', 'hustle' ); ?></div>
264
265 <div class="hui-column-data--right">
266
267 <a href="<?php echo esc_url( $wizard_page ); ?>" class="sui-button sui-button-ghost sui-accordion-item-action">
268 <span class="sui-icon-wrench-tool" aria-hidden="true"></span>
269 <?php esc_html_e( 'Configure', 'hustle' ); ?>
270 </a>
271
272 <button class="sui-button-icon sui-accordion-open-indicator">
273 <span class="sui-icon-chevron-down" aria-hidden="true"></span>
274 <span class="sui-screen-reader-text"><?php esc_html_e( 'Click to open', 'hustle' ); ?></span>
275 </button>
276
277 </div>
278
279 </div>
280
281 </td>
282
283 </tr>
284
285 <tr class="sui-accordion-item-content <?php echo ( $addon['summary']['data_sent'] ) ? 'sui-success' : 'sui-error'; ?>">
286
287 <td colspan="2">
288
289 <div class="sui-box">
290
291 <div class="sui-box-body">
292
293 <ul class="hui-list">
294
295 <?php foreach ( $addon['detail'] as $item ) : ?>
296
297 <li>
298 <strong><?php echo wp_kses_post( $item['label'] ); ?></strong>
299 <span><?php echo wp_kses_post( $item['value'] ); ?></span>
300 </li>
301
302 <?php endforeach; ?>
303
304 </ul>
305
306 </div>
307
308 <div class="sui-box-footer hui-hidden-desktop">
309
310 <a href="<?php echo esc_url( $wizard_page ); ?>" class="sui-button sui-button-ghost sui-accordion-item-action">
311 <span class="sui-icon-wrench-tool" aria-hidden="true"></span>
312 <?php esc_html_e( 'Configure', 'hustle' ); ?>
313 </a>
314
315 </div>
316
317 </div>
318
319 </td>
320
321 </tr>
322
323 <?php endforeach; ?>
324
325 </tbody>
326
327 </table>
328
329 </div>
330
331 </div>
332
333 <?php endif; ?>
334
335 </div>
336
337 <div class="sui-box-footer">
338
339 <button class="sui-button sui-button-red sui-button-ghost hustle-delete-entry-button"
340 data-id="<?php echo esc_attr( $db_entry_id ); ?>"
341 data-nonce=<?php echo esc_attr( wp_create_nonce( 'hustle_entries_request' ) ); ?>
342 data-title="<?php esc_html_e( 'Delete Entry', 'hustle' ); ?>"
343 data-description="<?php esc_html_e( 'Are you sure you wish to permanently delete this entry?', 'hustle' ); ?>"
344 >
345 <span class="sui-icon-trash" aria-hidden="true"></span>
346 <?php esc_html_e( 'Delete', 'hustle' ); ?>
347 </button>
348
349 </div>
350
351 </div>
352
353 </td>
354
355 </tr>
356
357 <?php endforeach; ?>
358
359 <?php else : ?>
360
361 <tr>
362 <td class="hui-column-notice" colspan="<?php echo count( $fields_headers ) + 2; ?>">
363
364 <?php
365 $notice_options = array(
366 array(
367 'type' => 'inline_notice',
368 'class' => 'sui-notice-error',
369 'icon' => 'info',
370 'value' => esc_html__( 'No entries were found.', 'hustle' ),
371 ),
372 );
373 $this->get_html_for_options( $notice_options );
374 ?>
375
376 </td>
377 </tr>
378
379 <?php endif; ?>
380
381 </tbody>
382
383 </table>
384
385 <?php
386 // Filter Bar.
387 $this->render(
388 'admin/email-lists/pagination-desktop',
389 array(
390 'actions_class' => 'hui-mobile-hidden',
391 'is_bottom' => true,
392 )
393 );
394 ?>
395
396 </div>
397