PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.9
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.9
4.4.9 4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 All 140 releases
learnpress / inc / admin / views / statistics / parts / report-modal.php

report-modal.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.4.9, at inc/admin/views/statistics/parts/report-modal.php

49 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Template for the statistics report popup body ( SweetAlert2 ).
4 *
5 * The table itself is server-rendered by AdminStatisticsReportTable through
6 * TemplateAJAX: the JS modal injects this body, sets the .lp-target args
7 * ( report + current filters + search ) and triggers the load. Pagination is
8 * handled by loadAJAX.js ( .page-numbers ); search + CSV export are wired by
9 * the report-modal JS module.
10 *
11 * @since 4.4.2
12 * @version 2.0.0
13 */
14
15 use LearnPress\TemplateHooks\Admin\AdminStatisticsReportTable;
16 use LearnPress\TemplateHooks\TemplateAJAX;
17
18 defined( 'ABSPATH' ) || exit();
19
20 $lp_report_args = array(
21 'id_url' => 'lp-stats-report',
22 'report' => '',
23 'paged' => 1,
24 'search' => '',
25 'enableScrollToView' => false,
26 'enableUpdateParamsUrl' => false,
27 'html_no_load_ajax_first' => sprintf(
28 '<div class="lp-stats-report-modal__loading">%s</div>',
29 esc_html__( 'Loading…', 'learnpress' )
30 ),
31 );
32
33 $lp_report_callback = array(
34 'class' => AdminStatisticsReportTable::class,
35 'method' => 'render_report_table',
36 );
37 ?>
38 <script type="text/html" id="lp-tmpl-stats-report-modal">
39 <div class="lp-stats-report-modal">
40 <div class="lp-stats-report-modal__toolbar">
41 <input type="search" class="lp-stats-report-modal__search" placeholder="<?php esc_attr_e( 'Search…', 'learnpress' ); ?>">
42 <button type="button" class="lp-stats-report-modal__export button"><?php esc_html_e( 'Export CSV', 'learnpress' ); ?></button>
43 </div>
44 <div class="lp-stats-report-modal__body">
45 <?php echo TemplateAJAX::load_content_via_ajax( $lp_report_args, $lp_report_callback ); ?>
46 </div>
47 </div>
48 </script>
49