menu.blade.php
106 lines
| 1 | <div id="click-tracking-menu" class="click-tracking-menu"> |
| 2 | <div class="settings-container"> |
| 3 | <div class="settings-container-header"> |
| 4 | <h1><?php esc_html_e('Click Tracking', 'independent-analytics'); ?></h1> |
| 5 | <a class="link-purple open-report" href="<?php echo esc_url(iawp_dashboard_url(['tab' => 'clicks'])); ?>"><span class="dashicons dashicons-analytics"></span> <?php esc_html_e('View Clicks Report', 'independent-analytics'); ?></a> |
| 6 | <a class="link-purple" href="https://independentwp.com/knowledgebase/click-tracking/click-tracking/" target="_blank"><span class="dashicons dashicons-book"></span> <?php esc_html_e('Read Tutorial', 'independent-analytics'); ?></a> |
| 7 | </div> |
| 8 | <div id="click-tracking-cache-message-container" class="<?php echo $show_click_tracking_cache_message ? 'show' : ''; ?>"> |
| 9 | <div class="cache-note"> |
| 10 | <span class="dashicons dashicons-warning"></span> |
| 11 | <p><?php esc_html_e('Please empty your cache to ensure your newest changes are tracked properly.', 'independent-analytics'); ?></p> |
| 12 | <button id="click-tracking-cache-cleared" class="iawp-button"><?php esc_html_e('Ok', 'independent-analytics'); ?></button> |
| 13 | </div> |
| 14 | </div> |
| 15 | <div id="validation-error-messages" class="validation-error-messages"> |
| 16 | <?php foreach ($error_messages as $class => $message) : ?> |
| 17 | <p class="<?php echo esc_attr($class); ?>"><span class="dashicons dashicons-warning"></span> <?php echo esc_html($message); ?></p> |
| 18 | <?php endforeach; ?> |
| 19 | </div> |
| 20 | <div class="tracked-links click-tracking-section"> |
| 21 | <div class="heading-container"> |
| 22 | <div> |
| 23 | <h2><?php esc_html_e('Link Patterns', 'independent-analytics'); ?></h2> |
| 24 | <p class="description"> |
| 25 | <?php esc_html_e('Links matching the patterns below are being actively monitored for clicks.', 'independent-analytics'); ?> |
| 26 | </p> |
| 27 | </div> |
| 28 | <button id="create-new-link" class="create-new-link iawp-button purple"><?php esc_html_e('Add Link Pattern', 'independent-analytics'); ?></button> |
| 29 | </div> |
| 30 | <div class="table-labels"> |
| 31 | <span><?php esc_html_e('Name', 'independent-analytics'); ?></span> |
| 32 | <span><?php esc_html_e('Type', 'independent-analytics'); ?></span> |
| 33 | <span><?php esc_html_e('Value', 'independent-analytics'); ?></span> |
| 34 | <button class="edit-button-for-spacing"><?php esc_html_e('Edit', 'independent-analytics'); ?></button> |
| 35 | <button class="edit-button-for-spacing"><?php esc_html_e('Archive', 'independent-analytics'); ?></button> |
| 36 | </div> |
| 37 | <div id="tracked-links-list" class="tracked-links-list"> |
| 38 | <div id="sortable-tracked-links-list"> |
| 39 | <?php |
| 40 | foreach($active_links as $link) { |
| 41 | echo iawp_blade()->run('click-tracking.link', [ |
| 42 | 'link' => $link, |
| 43 | 'types' => $types, |
| 44 | 'extensions' => $extensions, |
| 45 | 'protocols' => $protocols |
| 46 | ]); |
| 47 | } ?> |
| 48 | </div> |
| 49 | </div> |
| 50 | <p class="tracked-links-empty-message <?php echo count($active_links) === 0 ? "show" : ""; ?>"><?php esc_html_e('No link patterns found', 'independent-analytics'); ?></p> |
| 51 | <div id="blueprint-link" class="blueprint-link"><?php |
| 52 | echo iawp_blade()->run('click-tracking.link', [ |
| 53 | 'link' => [ |
| 54 | 'id' => null, |
| 55 | 'name' => '', |
| 56 | 'type' => 'class', |
| 57 | 'value' => '', |
| 58 | 'is_active' => null |
| 59 | ], |
| 60 | 'types' => $types, |
| 61 | 'extensions' => $extensions, |
| 62 | 'protocols' => $protocols |
| 63 | ]); ?> |
| 64 | </div> |
| 65 | </div> |
| 66 | <div id="archived-links" class="archived-links click-tracking-section"> |
| 67 | <h2> |
| 68 | <?php esc_html_e('Archived Link Patterns', 'independent-analytics'); ?> |
| 69 | </h2> |
| 70 | <p class="description"> |
| 71 | <?php esc_html_e('Archived link patterns are no longer tracked, but their data remains in the Clicks report. Deleting an archived link pattern will remove it from this list and remove its data from the Clicks report permanently.', 'independent-analytics'); ?> |
| 72 | </p> |
| 73 | <button id="toggle-archived-links" class="iawp-button toggle-archived-links" data-alt-text="<?php esc_html_e('Hide Archived Links', 'independent-analytics'); ?>"><?php esc_html_e('Show Archived Links', 'independent-analytics'); ?></button> |
| 74 | <div class="archived-links-table"> |
| 75 | <div class="table-labels"> |
| 76 | <span><?php esc_html_e('Name', 'independent-analytics'); ?></span> |
| 77 | <span><?php esc_html_e('Type', 'independent-analytics'); ?></span> |
| 78 | <span><?php esc_html_e('Value', 'independent-analytics'); ?></span> |
| 79 | <button class="edit-button-for-spacing"><?php esc_html_e('Resume Tracking', 'independent-analytics'); ?></button> |
| 80 | <button class="edit-button-for-spacing"><?php esc_html_e('Delete', 'independent-analytics'); ?></button> |
| 81 | </div> |
| 82 | <div id="archived-links-list" class="archived-links-list"><?php |
| 83 | foreach($inactive_links as $link) { |
| 84 | echo iawp_blade()->run('click-tracking.link', [ |
| 85 | 'link' => $link, |
| 86 | 'types' => $types, |
| 87 | 'extensions' => $extensions, |
| 88 | 'protocols' => $protocols |
| 89 | ]); |
| 90 | } ?> |
| 91 | </div> |
| 92 | <p class="archived-links-empty-message <?php echo count($inactive_links) === 0 ? "show" : ""; ?>"><?php esc_html_e('No archived link patterns found', 'independent-analytics'); ?></p> |
| 93 | </div> |
| 94 | </div> |
| 95 | </div> |
| 96 | <div id="delete-link-modal" aria-hidden="true" class="mm micromodal-slide delete-link-modal"> |
| 97 | <div tabindex="-1" class="mm__overlay" > |
| 98 | <div role="dialog" aria-modal="true" class="mm__container"> |
| 99 | <div class="modal-title"><?php esc_html_e('Are you sure?', 'independent-analytics'); ?></div> |
| 100 | <p><?php esc_html_e('Deleting this link pattern will remove its stats from the Clicks report permanently.', 'independent-analytics'); ?></p> |
| 101 | <button data-link-id="" class="iawp-button purple yes"><?php esc_html_e('Yes', 'independent-analytics'); ?></button> |
| 102 | <button class="iawp-button ghost-purple cancel" data-micromodal-close><?php esc_html_e('Cancel', 'independent-analytics'); ?></button> |
| 103 | </div> |
| 104 | </div> |
| 105 | </div> |
| 106 | </div> |