ga_accounts_selector.php
9 years ago
ga_auth_button.php
9 years ago
ga_code.php
6 years ago
ga_dashboard_widget.php
9 years ago
ga_debug_modal.php
8 years ago
ga_googleanalytics_loader.php
6 years ago
ga_notice.php
8 years ago
ga_oauth_notice.php
9 years ago
ga_wp_notice.php
9 years ago
page.php
6 years ago
statistics.php
9 years ago
stats.php
9 years ago
trending.php
8 years ago
trending.php
97 lines
| 1 | <div class="wrap ga-wrap"> |
| 2 | <h3 class="ga-trending-h3">Google Analytics</h3> |
| 3 | <h2 class="ga-trending-h2"><?php _e( 'Trending content' ); ?></h2> |
| 4 | <div class="ga_container <?php echo ( ! Ga_Helper::are_features_enabled() ) ? 'label-grey ga-tooltip' : ''; ?>" |
| 5 | id="exTab2"> |
| 6 | <?php if ( ! empty( $data['error_message'] ) ) : ?> |
| 7 | <?php echo $data['error_message']; ?> |
| 8 | <?php endif; ?> |
| 9 | <?php if ( ! empty( $data['ga_msg'] ) ) : ?> |
| 10 | <?php echo $data['ga_msg']; ?> |
| 11 | <?php endif; ?> |
| 12 | <span class="ga-tooltiptext ga-tooltiptext-trending"><?php _e( $tooltip ); ?></span> |
| 13 | <div class="ga-trending-loader"> |
| 14 | <div class="ga-trending-loader-wrapper"> |
| 15 | <div class="ga-loader"></div> |
| 16 | </div> |
| 17 | <div class="ga-trending-loading-text"><?php _e( 'Please wait. Trending Content Alerts are loading.' ); ?></div> |
| 18 | </div> |
| 19 | <?php if ( Ga_Helper::are_features_enabled() && empty( $errors ) ) : ?> |
| 20 | <?php if ( ! empty( $alerts ) && empty( $alerts->error ) ) : ?> |
| 21 | <div class="trending-table-container"> |
| 22 | <table class="ga-table ga-table-trending"> |
| 23 | <tr> |
| 24 | <th> |
| 25 | <?php _e( 'Top 5 Recent alerts' ); ?> |
| 26 | </th> |
| 27 | <th class="weight-normal"> |
| 28 | <?php _e( 'Views' ); ?> |
| 29 | </th> |
| 30 | <th class="weight-normal trending-time"> |
| 31 | <?php _e( 'Time Notified' ); ?> |
| 32 | </th> |
| 33 | </tr> |
| 34 | <?php foreach ( $alerts as $key => $alert ) : ?> |
| 35 | <tr> |
| 36 | <td> |
| 37 | <a class="trending-link" |
| 38 | href="<?php echo $alert->{"url"}; ?>"><?php echo $alert->{"url"}; ?></a> |
| 39 | </td> |
| 40 | <td><?php echo ( property_exists( $alert, "pageviews" ) ) ? $alert->{"pageviews"} : '0'; ?></td> |
| 41 | <td><?php echo date( 'F jS, g:ia', strtotime( $alert->{"sent_at"} ) ); ?></td> |
| 42 | </tr> |
| 43 | <?php if ( $key >= 4 ) { |
| 44 | break; |
| 45 | } ?> |
| 46 | <?php endforeach; ?> |
| 47 | </table> |
| 48 | </div> |
| 49 | <?php elseif ( ! empty( $alerts->error ) ) : ?> |
| 50 | <div class="ga-alert ga-alert-danger"> |
| 51 | <?php _e( $alerts->error ); ?> |
| 52 | </div> |
| 53 | <?php else : ?> |
| 54 | <div class="ga-alert ga-alert-warning"> |
| 55 | <?php _e( 'You will see a history of trending content here once the first article takes off.' ); ?> |
| 56 | <a class="ga-alert-link" href="http://tiny.cc/trending/"><?php _e( 'Click here to learn more' ); ?></a> |
| 57 | </div> |
| 58 | <?php endif; ?> |
| 59 | <?php endif; ?> |
| 60 | <div> |
| 61 | <form method="post"> |
| 62 | <?php wp_nonce_field(Ga_Admin_Controller::ACTION_SHARETHIS_INVITE, Ga_Admin_Controller::GA_NONCE_FIELD_NAME); ?> |
| 63 | <input type="hidden" name="<?php echo Ga_Controller_Core::ACTION_PARAM_NAME; ?>" |
| 64 | value="<?php echo Ga_Admin_Controller::ACTION_SHARETHIS_INVITE; ?>"> |
| 65 | <table> |
| 66 | <tr class="ga-ta-header"> |
| 67 | <th> |
| 68 | <?php _e( 'Trending alerts' ); ?> |
| 69 | </th> |
| 70 | </tr> |
| 71 | <tr> |
| 72 | <td> |
| 73 | <?php _e( 'Interested in receiving alerts via slack or email? Sign into your Social Optimization Platform account and activate it! |
| 74 | Enter your email and we\'ll send you an invite' ); ?> |
| 75 | </td> |
| 76 | </tr> |
| 77 | <tr> |
| 78 | <td><?php _e( 'Enter your email to receive an invite' ); ?> <input name="sharethis_invite_email" |
| 79 | type="email" value="" |
| 80 | <?php echo ( ! Ga_Helper::are_features_enabled() ) ? 'disabled="disabled"' : ''; ?> |
| 81 | placeholder="Your email address"> |
| 82 | <button <?php echo ( ! Ga_Helper::are_features_enabled() ) ? 'disabled="disabled"' : ''; ?> |
| 83 | type="submit" class="button button-primary"><?php _e( 'Send' ); ?></button> |
| 84 | </td> |
| 85 | </tr> |
| 86 | </table> |
| 87 | </form> |
| 88 | </div> |
| 89 | </div> |
| 90 | </div> |
| 91 | |
| 92 | <script type="text/javascript"> |
| 93 | <?php if( Ga_Helper::are_features_enabled() ) : ?> |
| 94 | ga_trending_loader.show(); |
| 95 | <?php endif; ?> |
| 96 | </script> |
| 97 |