filters.php
56 lines
| 1 | <?php |
| 2 | $filter_object = new \TUTOR\Course_Filter(); |
| 3 | $filter_levels = array( |
| 4 | 'beginner'=>'Beginner', |
| 5 | 'intermediate'=>'Intermediate', |
| 6 | 'expert'=>'Expert' |
| 7 | ); |
| 8 | $filter_prices=array( |
| 9 | 'free'=>'Free', |
| 10 | 'paid'=>'Paid' |
| 11 | ); |
| 12 | ?> |
| 13 | <div> |
| 14 | <div class="tutor-course-search-field"> |
| 15 | <input type="text" name="tutor-course-filter-keyword" placeholder="<?php _e('Search...'); ?>"/> |
| 16 | <i class="tutor-icon-magnifying-glass-1"></i> |
| 17 | </div> |
| 18 | <div> |
| 19 | <div> |
| 20 | <h4><?php _e('Category', 'tutor'); ?></h4> |
| 21 | <?php $filter_object->render_terms('category'); ?> |
| 22 | </div> |
| 23 | <div> |
| 24 | <h4><?php _e('Tag', 'tutor'); ?></h4> |
| 25 | <?php $filter_object->render_terms('tag'); ?> |
| 26 | </div> |
| 27 | </div> |
| 28 | <div> |
| 29 | <div> |
| 30 | <h4><?php _e('Level', 'tutor'); ?></h4> |
| 31 | <?php |
| 32 | foreach($filter_levels as $value=>$title){ |
| 33 | ?> |
| 34 | <label> |
| 35 | <input type="checkbox" name="tutor-course-filter-level" value="<?php echo $value; ?>"/> |
| 36 | <?php echo $title; ?> |
| 37 | </label> |
| 38 | <?php |
| 39 | } |
| 40 | ?> |
| 41 | </div> |
| 42 | <div> |
| 43 | <h4><?php _e('Price', 'tutor'); ?></h4> |
| 44 | <?php |
| 45 | foreach($filter_prices as $value=>$title){ |
| 46 | ?> |
| 47 | <label> |
| 48 | <input type="checkbox" name="tutor-course-filter-price" value="<?php echo $value; ?>"/> |
| 49 | <?php echo $title; ?> |
| 50 | </label> |
| 51 | <?php |
| 52 | } |
| 53 | ?> |
| 54 | </div> |
| 55 | </div> |
| 56 | </div> |