form-fields
11 months ago
modules
6 months ago
module-editor.blade.php
11 months ago
module-picker.blade.php
11 months ago
module-templates.blade.php
11 months ago
overview.blade.php
9 months ago
overview.blade.php
73 lines
| 1 | @php /** @var \IAWP\Env $env */ @endphp |
| 2 | @php /** @var \IAWP\Overview\Overview $overview */ @endphp |
| 3 | @php /** @var string $last_refreshed_at */ @endphp |
| 4 | @php /** @var \IAWP\Overview\Modules\Module[] $saved_modules */ @endphp |
| 5 | @php /** @var \IAWP\Overview\Modules\Module[] $template_modules */ @endphp |
| 6 | |
| 7 | <div id="report-header-container" class="report-header-container"> |
| 8 | <div id="report-title-bar" class="report-title-bar overview-report"> |
| 9 | <div class="primary-report-title-container"> |
| 10 | <h1 class="report-title"><?php esc_html_e('Overview', 'independent-analytics'); ?></h1> |
| 11 | <div class="last-updated-container"> |
| 12 | <span id="iawp-modules-refreshed-at"><?php echo sanitize_text_field($last_refreshed_at); ?></span> |
| 13 | <button class="refresh-overview-button" |
| 14 | data-controller="refresh-overview" |
| 15 | data-action="refresh-overview#refresh" |
| 16 | data-refresh-overview-loading-text-value="<?php esc_html_e('Refreshing...', 'independent-analytics'); ?>" |
| 17 | ><?php esc_html_e('Refresh', 'independent-analytics'); ?></button> |
| 18 | </div> |
| 19 | </div> |
| 20 | <div class="buttons"> |
| 21 | <div> |
| 22 | <button id="favorite-report-button" |
| 23 | data-controller="set-favorite-report" |
| 24 | data-set-favorite-report-type-value="overview" |
| 25 | data-action="set-favorite-report#setFavoriteReport" |
| 26 | class="iawp-button favorite <?php echo $env->is_favorite('overview') ? 'active' : ''; ?>" |
| 27 | > |
| 28 | <span class="dashicons dashicons-star-filled"></span> |
| 29 | <?php esc_html_e('Make default', 'independent-analytics'); ?> |
| 30 | </button> |
| 31 | </div> |
| 32 | </div> |
| 33 | </div> |
| 34 | <div id="toolbar" class="toolbar"> |
| 35 | <div class="overview-toolbar-buttons"> |
| 36 | <button data-controller="add-module" data-action="add-module#addModule" class="iawp-button add-module-toolbar-button"><span class="dashicons dashicons-plus"></span> <?php esc_html_e('Add Module', 'independent-analytics'); ?></button> |
| 37 | <button data-controller="reorder-modules" data-action="reorder-modules#toggleReordering" class="iawp-button reorder-modules-button"><span class="dashicons dashicons-sort"></span> <?php esc_html_e('Reorder Modules', 'independent-analytics'); ?></button> |
| 38 | </div> |
| 39 | <div class="download-options-parent" data-controller="modal"> |
| 40 | <div class="modal-parent downloads"> |
| 41 | <button id="download-options" data-modal-target="modalButton" data-action="click->modal#toggleModal" class="download-options"> |
| 42 | <?php esc_html_e('Download Report', 'independent-analytics'); ?> |
| 43 | </button> |
| 44 | <div class="iawp-modal small downloads" data-modal-target="modal"> |
| 45 | <div class="modal-inner"> |
| 46 | <div class="title-small"> |
| 47 | <?php esc_html_e('Download report', 'independent-analytics'); ?> |
| 48 | <span data-report-target="spinner" class="dashicons dashicons-update iawp-spin hidden"></span> |
| 49 | </div> |
| 50 | <button data-controller="export-overview" |
| 51 | data-action="export-overview#export" |
| 52 | class="pdf-export-button iawp-button" |
| 53 | ><?php esc_html_e('Download PDF', 'independent-analytics'); ?></button> |
| 54 | </div> |
| 55 | </div> |
| 56 | </div> |
| 57 | </div> |
| 58 | </div> |
| 59 | </div> |
| 60 | <div data-controller="module-list"> |
| 61 | <div id="module-list" class="module-list" data-module-list-target="list"><?php |
| 62 | foreach($saved_modules as $module) { |
| 63 | echo $module->get_module_html(); |
| 64 | } |
| 65 | echo iawp_blade()->run('overview.module-picker', [ |
| 66 | 'template_modules' => $template_modules |
| 67 | ]); ?> |
| 68 | </div><?php |
| 69 | echo iawp_blade()->run('overview.module-templates', [ |
| 70 | 'template_modules' => $template_modules |
| 71 | ]); ?> |
| 72 | </div> |
| 73 |