admin
10 months ago
core
10 months ago
class-activator.php
10 months ago
class-assets.php
11 months ago
class-builder-page.php
1 year ago
class-deactivator.php
3 years ago
class-debug-info.php
2 years ago
class-feed-ajax.php
1 year ago
class-feed-block.php
1 year ago
class-feed-deserializer.php
11 months ago
class-feed-old.php
4 years ago
class-feed-page.php
11 months ago
class-feed-serializer.php
2 years ago
class-feed-shortcode.php
2 years ago
class-feed-widget.php
4 years ago
class-plugin-overview-ajax.php
1 year ago
class-plugin-overview.php
11 months ago
class-plugin-settings.php
10 months ago
class-plugin-support.php
1 year ago
class-plugin.php
11 months ago
class-post-types.php
3 years ago
class-reviews-cron.php
1 year ago
class-settings-save.php
1 year ago
class-view.php
10 months ago
index.php
4 years ago
page-setting-advance.php
1 year ago
page-setting-fig.php
1 year ago
page-setting-support.php
4 years ago
class-plugin-overview.php
108 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WP_Rplg_Google_Reviews\Includes; |
| 4 | |
| 5 | use WP_Rplg_Google_Reviews\Includes\Core\Core; |
| 6 | |
| 7 | class Plugin_Overview { |
| 8 | |
| 9 | private $builder_page; |
| 10 | |
| 11 | public function __construct($builder_page) { |
| 12 | $this->builder_page = $builder_page; |
| 13 | } |
| 14 | |
| 15 | public function register() { |
| 16 | add_action('grw_admin_page_grw', array($this, 'init')); |
| 17 | |
| 18 | $render_function; |
| 19 | $feed_ids = get_option('grw_feed_ids'); |
| 20 | if (empty($feed_ids)) { |
| 21 | $render_function = array($this, 'connect'); |
| 22 | } else { |
| 23 | $render_function = array($this, 'render'); |
| 24 | } |
| 25 | |
| 26 | add_action('grw_admin_page_grw', $render_function); |
| 27 | } |
| 28 | |
| 29 | public function init() { |
| 30 | |
| 31 | } |
| 32 | |
| 33 | public function connect() { |
| 34 | $this->builder_page->render(null); |
| 35 | } |
| 36 | |
| 37 | public function render() { |
| 38 | wp_nonce_field('grw_wpnonce', 'grw_nonce'); |
| 39 | wp_enqueue_script('grw-admin-apexcharts-js'); |
| 40 | ?> |
| 41 | |
| 42 | <div class="grw-page-title"> |
| 43 | Overview |
| 44 | </div> |
| 45 | |
| 46 | <div class="grw-overview-workspace"> |
| 47 | |
| 48 | <div class="grw-overview-places"> |
| 49 | <select id="grw-overview-months"> |
| 50 | <option value="6" selected>6 months</option> |
| 51 | <option value="12">a year</option> |
| 52 | <option value="24">2 years</option> |
| 53 | <option value="36">3 years</option> |
| 54 | <option value="60">5 years</option> |
| 55 | </select> |
| 56 | <select id="grw-overview-places"></select> |
| 57 | </div> |
| 58 | |
| 59 | <div class="grw-flex-row"> |
| 60 | <div class="grw-flex-col6"> |
| 61 | |
| 62 | <div class="grw-card"> |
| 63 | <div class="grw-card-body"> |
| 64 | <div id="chart"></div> |
| 65 | </div> |
| 66 | </div> |
| 67 | |
| 68 | </div> |
| 69 | |
| 70 | <div class="grw-flex-col4"> |
| 71 | |
| 72 | <div class="grw-flex-row"> |
| 73 | |
| 74 | <div class="grw-flex-col"> |
| 75 | <div class="grw-card"> |
| 76 | <div class="grw-card-header">Rating</div> |
| 77 | <div class="grw-card-body grw-card-fh"> |
| 78 | <div id="grw-overview-rating"><img src="<?php echo GRW_ASSETS_URL; ?>img/dots-spinner.svg"></div> |
| 79 | </div> |
| 80 | </div><br> |
| 81 | <div class="grw-card"> |
| 82 | <div class="grw-card-header">Usage Stats</div> |
| 83 | <div class="grw-card-body grw-card-fh"> |
| 84 | <div id="grw-overview-stats"><img src="<?php echo GRW_ASSETS_URL; ?>img/dots-spinner.svg"></div> |
| 85 | </div> |
| 86 | </div> |
| 87 | </div> |
| 88 | |
| 89 | <div class="grw-flex-col"> |
| 90 | <div class="grw-card"> |
| 91 | <div class="grw-card-header">Latest Reviews</div> |
| 92 | <div class="grw-card-body grw-card-fh" style="padding-top:0"> |
| 93 | <div id="grw-overview-reviews"><img src="<?php echo GRW_ASSETS_URL; ?>img/dots-spinner.svg"></div> |
| 94 | </div> |
| 95 | </div> |
| 96 | </div> |
| 97 | </div> |
| 98 | |
| 99 | </div> |
| 100 | |
| 101 | </div> |
| 102 | |
| 103 | </div> |
| 104 | |
| 105 | <?php |
| 106 | } |
| 107 | } |
| 108 |