contexts.php
3 years ago
qna-new.php
3 years ago
qna-single.php
2 months ago
qna-table.php
4 days ago
qna-new.php
56 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Tutor Q&A |
| 4 | * |
| 5 | * @package Tutor\Views |
| 6 | * @subpackage Tutor\Q&A |
| 7 | * @author Themeum <support@themeum.com> |
| 8 | * @link https://themeum.com |
| 9 | * @since 2.0.0 |
| 10 | */ |
| 11 | |
| 12 | extract( $data ); // $course_id, $context. |
| 13 | ?> |
| 14 | <div class="tutor-qa-new tutor-quesanswer" data-course_id="<?php echo esc_attr( $course_id ); ?>" data-question_id="0" data-context="<?php echo esc_attr( $context ); ?>"> |
| 15 | <div class="tutor-quesanswer-askquestion tutor-qna-reply-editor"> |
| 16 | |
| 17 | <?php |
| 18 | $placeholder = __( 'Do you have any questions?', 'tutor' ); |
| 19 | $text_editor = '<textarea placeholder="' . $placeholder . '" class="tutor-form-control"></textarea>'; |
| 20 | //phpcs:ignore |
| 21 | echo apply_filters( |
| 22 | 'tutor_qna_text_editor', |
| 23 | $text_editor |
| 24 | ); |
| 25 | ?> |
| 26 | <?php if ( 'course-single-qna-sidebar' == $data['context'] ) : ?> |
| 27 | <div class="sidebar-ask-new-qna-submit tutor-row tutor-mt-16"> |
| 28 | <div class="tutor-col"> |
| 29 | <button class="sidebar-ask-new-qna-cancel-btn tutor-btn tutor-btn-outline-primary tutor-btn-block"> |
| 30 | <?php esc_html_e( 'Cancel', 'tutor' ); ?> |
| 31 | </button> |
| 32 | </div> |
| 33 | |
| 34 | <div class="tutor-col"> |
| 35 | <button class="sidebar-ask-new-qna-submit-btn tutor-btn tutor-btn-primary tutor-btn-block"> |
| 36 | <?php esc_html_e( 'Submit', 'tutor' ); ?> |
| 37 | </button> |
| 38 | </div> |
| 39 | </div> |
| 40 | |
| 41 | <div class="sidebar-ask-new-qna-btn-wrap"> |
| 42 | <a class="sidebar-ask-new-qna-btn tutor-btn tutor-btn-primary tutor-btn-block"> |
| 43 | <?php esc_html_e( 'Ask a New Question', 'tutor' ); ?> |
| 44 | </a> |
| 45 | </div> |
| 46 | <?php else : ?> |
| 47 | <div class="tutor-d-flex tutor-justify-end tutor-mt-24"> |
| 48 | <button class="sidebar-ask-new-qna-submit-btn tutor-btn tutor-btn-primary"> |
| 49 | <?php esc_html_e( 'Ask Question', 'tutor' ); ?> |
| 50 | </button> |
| 51 | </div> |
| 52 | <?php endif ?> |
| 53 | </div> |
| 54 | </div> |
| 55 | <div class="tutor-qna-single-question"></div> |
| 56 |