| @@ -10,9 +10,15 @@ | ||
| 10 | 10 | |
| 11 | 11 | namespace MainWP\Dashboard\Module\Log; |
| 12 | 12 | |
| 13 | 13 | use MainWP\Dashboard\MainWP_Utility; |
| 14 | +use MainWP\Dashboard\MainWP_UI; | |
| 14 | 15 | |
| 16 | +// Exit if accessed directly. | |
| 17 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 18 | + exit; | |
| 19 | +} | |
| 20 | + | |
| 15 | 21 | /** |
| 16 | 22 | * Class Log_Themes_Widget |
| 17 | 23 | * |
| 18 | 24 | * Displays the Logs info. |
| @@ -77,17 +83,17 @@ | ||
| 77 | 83 | } |
| 78 | 84 | |
| 79 | 85 | ?> |
| 80 | 86 | <div class="mainwp-widget-header"> |
| 81 | - <h3 class="ui header handle-drag"> | |
| 87 | + <h2 class="ui header handle-drag"> | |
| 82 | 88 | <?php esc_html_e( 'Themes Management Activity Overview', 'mainwp' ); ?> |
| 83 | 89 | <div class="sub header"> |
| 84 | 90 | <?php esc_html_e( 'Comprehensive bar chart reflecting theme actions culminating in a total activity count.', 'mainwp' ); ?> |
| 85 | 91 | </div> |
| 86 | - </h3> | |
| 92 | + </h2> | |
| 87 | 93 | </div> |
| 88 | 94 | |
| 89 | - <div class="mainwp-widget-insights-card"> | |
| 95 | + <div class="mainwp-widget-insights-card mainwp-scrolly-overflow"> | |
| 90 | 96 | <?php |
| 91 | 97 | /** |
| 92 | 98 | * Action: mainwp_logs_widget_top |
| 93 | 99 | * |
| @@ -98,10 +104,14 @@ | ||
| 98 | 104 | do_action( 'mainwp_logs_widget_top', 'themes' ); |
| 99 | 105 | ?> |
| 100 | 106 | <div id="mainwp-message-zone" style="display:none;" class="ui message"></div> |
| 101 | 107 | <?php |
| 102 | - wp_nonce_field( 'mainwp-admin-nonce' ); | |
| 103 | - $this->render_widget_content( $stats_data, $stats_prev_data ); | |
| 108 | + MainWP_UI::generate_wp_nonce( 'mainwp-admin-nonce' ); | |
| 109 | + if ( ! empty( $data ) ) { | |
| 110 | + $this->render_widget_content( $stats_data, $stats_prev_data ); | |
| 111 | + } else { | |
| 112 | + MainWP_UI::render_empty_element_placeholder( __( 'No activity recorded', 'mainwp' ), __( 'Data will appear here once actions are tracked.', 'mainwp' ), '<em data-emoji=":bar_chart:" class="medium"></em>' ); | |
| 113 | + } | |
| 104 | 114 | ?> |
| 105 | 115 | <?php |
| 106 | 116 | /** |
| 107 | 117 | * Action: mainwp_logs_widget_bottom |
| @@ -136,10 +146,10 @@ | ||
| 136 | 146 | 'delete' => esc_html__( 'Deleted', 'mainwp' ), |
| 137 | 147 | 'total_events' => esc_html__( 'Total', 'mainwp' ), |
| 138 | 148 | ); |
| 139 | 149 | ?> |
| 140 | - <div class="ui one column grid"> | |
| 141 | - <div class="left aligned middle aligned column"> | |
| 150 | + <div class="ui grid"> | |
| 151 | + <div class="sixteen wide column"> | |
| 142 | 152 | <div class="ui equal width grid"> |
| 143 | 153 | <?php |
| 144 | 154 | foreach ( $columns as $act => $title ) { |
| 145 | 155 | Log_Stats::render_stats_info( $data, $act, $title, $prev_data ); |
| @@ -146,9 +156,9 @@ | ||
| 146 | 156 | } |
| 147 | 157 | ?> |
| 148 | 158 | </div> |
| 149 | 159 | </div> |
| 150 | - <div class="left aligned middle aligned column"> | |
| 160 | + <div class="sixteen wide column"> | |
| 151 | 161 | <div id="mainwp-module-log-chart-themes-management-wrapper" ></div> |
| 152 | 162 | <script type="text/javascript"> |
| 153 | 163 | jQuery( document ).ready( function() { |
| 154 | 164 | let options = { |