<?xml version="1.0"?>
<t name="Question: number or date (and time) result (numerical_box or date or datetime)" t-name="survey.question_result_number_or_date_or_datetime">
        <t t-if="question.question_type == 'numerical_box'">
            <span class="float-end mt8">
                <div class="btn-group o_survey_results_question_pill" role="group" aria-label="Maximum">
                    <span class="badge text-bg-secondary only_left_radius px-2 pt-1">Maximum </span>
                    <span class="badge text-bg-success only_right_radius px-2 pt-1" t-esc="question_data['numerical_max']"/>
                </div>
                <div class="btn-group o_survey_results_question_pill" role="group" aria-label="Minimum">
                    <span class="badge text-bg-secondary only_left_radius px-2 pt-1">Minimum </span>
                    <span class="badge text-bg-danger only_right_radius px-2 pt-1" t-esc="question_data['numerical_min']"/>
                </div>
                <div class="btn-group o_survey_results_question_pill" role="group" aria-label="Average">
                    <span class="badge text-bg-secondary only_left_radius px-2 pt-1">Average </span>
                    <span class="badge text-bg-warning only_right_radius px-2 pt-1" t-esc="question_data['numerical_average']"/>
                </div>
            </span>
        </t>

        <ul class="nav nav-tabs d-print-none" role="tablist">
            <li class="nav-item">
                <a t-att-href="'#survey_stats_question_%d' % question.id" t-att-aria-controls="'survey_stats_question_%d' % question.id" class="nav-link active" data-bs-toggle="tab" role="tab">
                    <i class="fa fa-list-ol me-1"/>Most Common
                </a>
            </li>
            <li class="nav-item">
                <a t-att-href="'#survey_data_question_%d' % question.id" t-att-aria-controls="'survey_data_question_%d' % question.id" class="nav-link" data-bs-toggle="tab" role="tab">
                    <i class="fa fa-list-alt me-1"/>All Data
                </a>
            </li>
        </ul>
        <div class="tab-content">
            <div role="tabpanel" class="tab-pane active with-3d-shadow with-transitions" t-att-id="'survey_stats_question_%d' % question.id">
                <table class="table table-hover table-sm">
                    <thead>
                        <tr>
                            <th>User Responses</th>
                            <th>Occurrence</th>
                            <th t-if="question.is_scored_question">Score</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr t-foreach="question_data['common_lines']" t-as="common_line">
                            <td>
                                <t t-if="question.question_type == 'numerical_box'">
                                    <t t-set="right_answer" t-value="common_line[0] == question.answer_numerical_box"/>
                                    <span t-call="survey.survey_remove_unnecessary_decimals"><t t-set="value_to_format" t-value="common_line[0]"/></span>
                                    <i t-if="right_answer" class="fa fa-check"/>
                                </t>
                                <t t-elif="question.question_type == 'date'">
                                    <t t-set="right_answer" t-value="common_line[0] == question.answer_date"/>
                                    <span t-esc="common_line[0]" t-options="{&quot;widget&quot;: &quot;date&quot;}"/>
                                    <i t-if="right_answer" class="fa fa-check"/>
                                </t>
                                <t t-elif="question.question_type == 'datetime'">
                                    <t t-set="right_answer" t-value="common_line[0] == question.answer_datetime"/>
                                    <span t-esc="common_line[0]" t-options="{&quot;widget&quot;: &quot;datetime&quot;}"/>
                                    <i t-if="right_answer" class="fa fa-check"/>
                                </t>
                            </td>
                            <td><span t-esc="common_line[1]"/></td>
                            <td t-if="question.is_scored_question">
                                <span t-if="right_answer" t-call="survey.survey_remove_unnecessary_decimals">
                                    <t t-set="value_to_format" t-value="question.answer_score"/>
                                </span>
                                <span t-else="">0</span>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
            <div role="tabpanel" class="tab-pane" t-att-id="'survey_data_question_%d' % question.id">
                <table class="table table-hover table-sm" t-att-id="'survey_table_question_%d' % question.id">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>User Responses</th>
                        </tr>
                    </thead>
                    <tbody>
                        <t t-foreach="table_data" t-as="input_line">
                            <tr t-if="not input_line.skipped" t-att-class="'d-none' if input_line_index &gt;= page_record_limit else ''">
                                <td>
                                    <t t-if="no_print_url"><t t-esc="input_line_index + 1"/></t>
                                    <t t-else="">
                                        <a t-att-href="input_line.user_input_id.get_print_url()">
                                            <t t-esc="input_line_index + 1"/>
                                        </a>
                                    </t>
                                </td>
                                <td>
                                    <a t-if="question.question_type == 'numerical_box'" t-att-href="input_line.user_input_id.get_print_url()" t-field="input_line.value_numerical_box"/>
                                    <a t-if="question.question_type == 'date'" t-att-href="input_line.user_input_id.get_print_url()" t-field="input_line.value_date"/>
                                    <t t-if="question.question_type == 'datetime'">
                                        <span t-if="no_print_url" t-field="input_line.value_datetime"/>
                                        <a t-else="" t-att-href="input_line.user_input_id.get_print_url()" t-field="input_line.value_datetime"/>
                                    </t>
                                </td>
                            </tr>
                        </t>
                    </tbody>
                </table>
               <t t-call="survey.question_table_pagination"/>
            </div>
        </div>
    </t>

    