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.0 3.6.1 3.6.2 3.6.3 3.6.4 3.7.0 3.7.1 3.7.2 3.7.3 3.7.4 3.8.0 3.8.1 3.8.2 3.8.3 3.9.0 3.9.1 3.9.10 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9
tutor / views / elements / filters.php
tutor / views / elements Last commit date
bulk-confirm-popup.php 3 years ago common-confirm-popup.php 3 years ago elements_style.php 3 years ago filters.php 3 years ago navbar.php 3 years ago pagination.php 4 years ago purchase-history-filter.php 4 years ago search-filter.php 4 years ago
filters.php
161 lines
1 <?php
2
3 use TUTOR\Input;
4
5 if ( isset( $data ) ) : ?>
6 <div class="tutor-px-20">
7 <div class="tutor-wp-dashboard-filter tutor-d-flex tutor-align-end tutor-justify-<?php echo esc_attr( isset( $data['bulk_action'] ) && true === $data['bulk_action'] ? 'between' : 'end' ); ?>">
8 <?php if ( isset( $data['bulk_action'] ) && true === $data['bulk_action'] ) : ?>
9 <div class="tutor-wp-dashboard-filter-items tutor-d-flex tutor-flex-xl-nowrap tutor-flex-wrap">
10 <form id="tutor-admin-bulk-action-form" action method="post">
11 <input type="hidden" name="action" value="<?php echo esc_html( $data['ajax_action'] ); ?>" />
12 <div class="tutor-d-flex">
13 <div class="tutor-mr-12">
14 <select name="bulk-action" title="Please select an action" class="tutor-form-select">
15 <?php foreach ( $data['bulk_actions'] as $k => $v ) : ?>
16 <option value="<?php echo esc_attr( $v['value'] ); ?>">
17 <?php echo esc_html( $v['option'] ); ?>
18 </option>
19 <?php endforeach; ?>
20 </select>
21 </div>
22 <button class="tutor-btn tutor-btn-outline-primary" id="tutor-admin-bulk-action-btn" data-tutor-modal-target="tutor-bulk-confirm-popup">
23 <?php esc_html_e( 'Apply', 'tutor' ); ?>
24 </button>
25 </div>
26 </form>
27 </div>
28 <?php endif; ?>
29 <?php if ( isset( $data['filters'] ) && true === $data['filters'] ) : ?>
30 <?php
31 $courses = ( current_user_can( 'administrator' ) ) ? tutor_utils()->get_courses() : tutor_utils()->get_courses_by_instructor();
32 $terms_arg = array(
33 'taxonomy' => 'course-category',
34 'orderby' => 'term_id',
35 'order' => 'DESC',
36 );
37 $categories = get_terms( $terms_arg );
38 ?>
39
40 <div class="tutor-wp-dashboard-filter-items tutor-d-flex tutor-flex-xl-nowrap tutor-flex-wrap">
41 <div class="tutor-wp-dashboard-filter-item item-reset">
42 <label class="tutor-form-label">
43 </label>
44 <?php
45 $page = Input::get( 'page', '' );
46 $sub_page = Input::get( 'sub_page', '' );
47 $current_tab = Input::get( 'tab', '' );
48 if ( '' === $sub_page && '' !== $current_tab ) {
49 $sub_page = $current_tab;
50 }
51 $url = '';
52 /**
53 * Tab query param support added for reset link
54 *
55 * @since v2.1.0
56 */
57 if ( '' === $sub_page && '' === $current_tab ) {
58 $url = "?page=$page";
59 } elseif ( '' === $current_tab ) {
60 $url = "?page=$page&sub_page=$sub_page";
61 } else {
62 $url = "?page=$page&tab=$current_tab";
63 }
64
65 ?>
66 <a class="tutor-btn tutor-btn-ghost tutor-mt-sm-28" href="<?php echo esc_url( $url ); ?>">
67 <i class="tutor-icon-refresh tutor-mr-8" area-hidden="true"></i> <?php esc_html_e( 'Reset', 'tutor' ); ?>
68 </a>
69 </div>
70 <?php
71 $course_id = Input::get( 'course-id', 0, Input::TYPE_INT );
72 $order = Input::get( 'order', 'DESC' );
73 $date = Input::get( 'date', '' );
74 $search = Input::get( 'search', '' );
75 $category_slug = Input::get( 'category', '' );
76 ?>
77 <?php if ( isset( $data['course_filter'] ) && true === $data['course_filter'] ) : ?>
78 <div class="tutor-wp-dashboard-filter-item">
79 <label class="tutor-form-label">
80 <?php esc_html_e( 'Course', 'tutor' ); ?>
81 </label>
82 <select class="tutor-form-select" id="tutor-backend-filter-course">
83 <?php if ( count( $courses ) ) : ?>
84 <option value="">
85 <?php esc_html_e( 'All Courses', 'tutor' ); ?>
86 </option>
87 <?php foreach ( $courses as $course ) : ?>
88 <option value="<?php echo esc_attr( $course->ID ); ?>" <?php selected( $course_id, $course->ID, 'selected' ); ?>>
89 <?php echo esc_html( $course->post_title ); ?>
90 </option>
91 <?php endforeach; ?>
92 <?php else : ?>
93 <option value=""><?php esc_html_e( 'No course found', 'tutor' ); ?></option>
94 <?php endif; ?>
95 </select>
96 </div>
97 <?php endif; ?>
98 <?php if ( isset( $data['category_filter'] ) && true === $data['category_filter'] ) : ?>
99 <div class="tutor-wp-dashboard-filter-item">
100 <label class="tutor-form-label">
101 <?php esc_html_e( 'Category', 'tutor' ); ?>
102 </label>
103 <select class="tutor-form-select" id="tutor-backend-filter-category">
104 <?php if ( count( $categories ) ) : ?>
105 <option value="">
106 <?php esc_html_e( 'All Category', 'tutor' ); ?>
107 </option>
108 <?php foreach ( $categories as $category ) : ?>
109 <option value="<?php echo esc_attr( $category->slug ); ?>" <?php selected( $category_slug, $category->slug, 'selected' ); ?>>
110 <?php echo esc_html( $category->name ); ?>
111 </option>
112 <?php endforeach; ?>
113 <?php else : ?>
114 <option value=""><?php esc_html_e( 'No record found', 'tutor' ); ?></option>
115 <?php endif; ?>
116 </select>
117 </div>
118 <?php endif; ?>
119
120 <?php if ( ! isset( $data['sort_by'] ) || $data['sort_by'] == true ) : ?>
121 <div class="tutor-wp-dashboard-filter-item">
122 <label class="tutor-form-label">
123 <?php esc_html_e( 'Sort By', 'tutor' ); ?>
124 </label>
125 <select class="tutor-form-select" id="tutor-backend-filter-order" data-search="no">
126 <option value="DESC" <?php selected( $order, 'DESC', 'selected' ); ?>>
127 <?php esc_html_e( 'DESC', 'tutor' ); ?>
128 </option>
129 <option value="ASC" <?php selected( $order, 'ASC', 'selected' ); ?>>
130 <?php esc_html_e( 'ASC', 'tutor' ); ?>
131 </option>
132 </select>
133 </div>
134 <?php endif; ?>
135 <div class="tutor-wp-dashboard-filter-item">
136 <label class="tutor-form-label">
137 <?php esc_html_e( 'Date', 'tutor' ); ?>
138 </label>
139 <div class="tutor-v2-date-picker"></div>
140 </div>
141 <div class="tutor-wp-dashboard-filter-item">
142 <form action="" method="get" id="tutor-admin-search-filter-form">
143 <label class="tutor-form-label">
144 <?php esc_html_e( 'Search', 'tutor' ); ?>
145 </label>
146 <div class="tutor-form-wrap">
147 <span class="tutor-form-icon"><span class="tutor-icon-search" area-hidden="true"></span></span>
148 <input type="search" class="tutor-form-control" id="tutor-backend-filter-search" name="search" placeholder="<?php esc_html_e( 'Search...' ); ?>" value="<?php echo esc_html( wp_unslash( $search ) ); ?>" />
149 </div>
150 </form>
151 </div>
152 </div>
153 <?php endif; ?>
154 </div>
155 </div>
156 <?php endif; ?>
157
158 <?php
159 tutor_load_template_from_custom_path( tutor()->path . 'views/elements/bulk-confirm-popup.php' );
160 ?>
161