| @@ -1,84 +1,0 @@ | ||
| 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="acym_front_page <?php echo esc_attr($data['paramsCMS']['suffix'] ?? ''); ?>"> | |
| 6 | - <?php | |
| 7 | - if (!empty($data['paramsCMS']['show_page_heading'])) { | |
| 8 | - echo '<h1 class="contentheading '.esc_attr($data['paramsCMS']['suffix'] ?? '').'">'.esc_html($data['paramsCMS']['page_heading'] ?? '').'</h1>'; | |
| 9 | - } | |
| 10 | - ?> | |
| 11 | - <div class="acym__front__archive"> | |
| 12 | - <form method="post" action="<?php | |
| 13 | - echo esc_url($data['actionUrl']); ?>" id="acym_form" class="acym__archive__form"> | |
| 14 | - <h1 class="acym__front__archive__title"><?php echo esc_html(acym_translation('ACYM_NEWSLETTERS')); ?></h1> | |
| 15 | - <div id="acym__front__archive__search" class="grid-x"> | |
| 16 | - <?php | |
| 17 | - if (!empty($data['paramsCMS']['widget_id'])) { | |
| 18 | - echo '<input type="text" name="acym_search['.esc_attr($data['paramsCMS']['widget_id']).']" value="'.esc_attr($data['search']).'">'; | |
| 19 | - } else { | |
| 20 | - ?> | |
| 21 | - <input type="text" name="acym_search" value="<?php echo esc_attr($data['search']); ?>"> | |
| 22 | - <?php } | |
| 23 | - $disableSearch = ''; | |
| 24 | - if (isset($data['disableButtons']) && $data['disableButtons']) { | |
| 25 | - $disableSearch = 'disabled'; | |
| 26 | - } | |
| 27 | - ?> | |
| 28 | - <button class="button btn btn-primary subbutton" <?php echo esc_attr($disableSearch); ?>><?php echo esc_html(acym_translation('ACYM_SEARCH')); ?></button> | |
| 29 | - </div> | |
| 30 | - | |
| 31 | - <?php | |
| 32 | - if (empty($data['newsletters'])) { | |
| 33 | - echo esc_html(acym_translation('ACYM_NOTHING_FOR_SEARCH')); | |
| 34 | - } else { | |
| 35 | - foreach ($data['newsletters'] as $oneNewsletter) { | |
| 36 | - $archiveURL = acym_frontendLink('archive&task=view&id='.$oneNewsletter->id.'&'.acym_noTemplate()); | |
| 37 | - | |
| 38 | - if ($data['popup']) { | |
| 39 | - $iframeClass = 'acym__modal__iframe'; | |
| 40 | - if (empty($data['userId'])) $iframeClass .= ' acym__front__not_connected_user'; | |
| 41 | - echo wp_kses( | |
| 42 | - acym_frontModal($archiveURL, $oneNewsletter->subject, false, $oneNewsletter->id, $iframeClass), | |
| 43 | - [ | |
| 44 | - 'link' => [ | |
| 45 | - 'rel' => true, | |
| 46 | - 'href' => true, | |
| 47 | - 'type' => true, | |
| 48 | - ], | |
| 49 | - 'a' => [ | |
| 50 | - 'class' => true, | |
| 51 | - 'data-acym-modal' => true, | |
| 52 | - 'href' => true, | |
| 53 | - ], | |
| 54 | - 'div' => [ | |
| 55 | - 'class' => true, | |
| 56 | - 'id' => true, | |
| 57 | - 'style' => true, | |
| 58 | - ], | |
| 59 | - 'span' => [ | |
| 60 | - ], | |
| 61 | - 'iframe' => [ | |
| 62 | - 'class' => true, | |
| 63 | - 'src' => true, | |
| 64 | - ], | |
| 65 | - ] | |
| 66 | - ); | |
| 67 | - } else { | |
| 68 | - echo '<p class="acym__front__archive__raw"><a href="'.esc_url($archiveURL).'" target="_blank">'.esc_html($oneNewsletter->subject).'</a></p>'; | |
| 69 | - } | |
| 70 | - echo '<p class="acym__front__archive__newsletter_sending-date">'; | |
| 71 | - echo esc_html(acym_translation('ACYM_SENDING_DATE').' : '.acym_date($oneNewsletter->sending_date, 'd M Y')); | |
| 72 | - echo '</p>'; | |
| 73 | - } | |
| 74 | - | |
| 75 | - $data['pagination']->display('archive', '', true); | |
| 76 | - } | |
| 77 | - | |
| 78 | - acym_formOptions(true, 'listing', '', '', false); | |
| 79 | - ?> | |
| 80 | - | |
| 81 | - <input type="hidden" name="acym_front_page" id="acym__front__archive__next-page" value="1"> | |
| 82 | - </form> | |
| 83 | - </div> | |
| 84 | -</div> | |