diff options
| author | Aurélien Warnon <awa@odoo.com> | 2020-03-04 10:05:02 +0000 |
|---|---|---|
| committer | Aurélien Warnon <awa@odoo.com> | 2020-03-31 15:12:06 +0000 |
| commit | afd78f12ae99f61323467dc67813cfdb257272b7 (patch) | |
| tree | 8df1a52f85b28caa9efb0dd5d04c2f01ab52dd53 | |
| parent | aaf3cb50c31f4e27b26fa01f540aaba2da7e8255 (diff) | |
[IMP] survey: show matrix choices on session host view
This commit improves the session host view by showing matrix choices for matrix
questions.
This is done to help people in the audience that are not participating to the
session to have some context about possibles question answers.
LINKS
PR #46768
Task 2208574
| -rw-r--r-- | addons/survey/static/src/scss/survey_form.scss | 35 | ||||
| -rw-r--r-- | addons/survey/views/survey_templates.xml | 2 | ||||
| -rw-r--r-- | addons/survey/views/survey_templates_user_input_session.xml | 5 |
3 files changed, 25 insertions, 17 deletions
diff --git a/addons/survey/static/src/scss/survey_form.scss b/addons/survey/static/src/scss/survey_form.scss index aaa62d7f38f..9f76f380101 100644 --- a/addons/survey/static/src/scss/survey_form.scss +++ b/addons/survey/static/src/scss/survey_form.scss @@ -18,7 +18,7 @@ nav#oe_main_menu_navbar { min-height: 100%; } -.o_survey_form, .o_survey_print, .o_survey_quick_access { +.o_survey_form, .o_survey_print, .o_survey_session_manage, .o_survey_quick_access { .o_survey_question_error { height: 0px; transition: height .5s ease; @@ -109,6 +109,17 @@ nav#oe_main_menu_navbar { } } +.o_survey_form, .o_survey_session_manage { + .o_survey_question_matrix { + th { + background-color: $primary; + } + td { + background-color: rgba($primary, 0.2); + } + } +} + /********************************************************** Form Specific Style **********************************************************/ @@ -157,19 +168,11 @@ nav#oe_main_menu_navbar { } } - .o_survey_question_matrix { - th { - background-color: $primary; - } - td { - background-color: rgba($primary, 0.2); - &:hover { - background-color: rgba($primary, 0.5); - cursor: pointer; - .o_survey_choice_key span.o_survey_key { - opacity: 1; - } - } + .o_survey_question_matrix td:hover { + background-color: rgba($primary, 0.5); + cursor: pointer; + .o_survey_choice_key span.o_survey_key { + opacity: 1; } } } @@ -216,8 +219,8 @@ nav#oe_main_menu_navbar { height: 100vh; width: 85vw; - .js_question-wrapper { - padding-bottom: 0px; + .o_survey_choice_key { + display: none; } &.pt-6 { diff --git a/addons/survey/views/survey_templates.xml b/addons/survey/views/survey_templates.xml index 57e56103ef9..66429746018 100644 --- a/addons/survey/views/survey_templates.xml +++ b/addons/survey/views/survey_templates.xml @@ -302,7 +302,7 @@ t-att-id="question.id" t-att-data-required="question.constr_mandatory" t-att-data-constr-error-msg="question.constr_error_msg" t-att-data-validation-error-msg="question.validation_error_msg"> - <h4> + <h4 t-if="not hide_question_title"> <span t-field='question.title' /> <span t-if="question.constr_mandatory" class="text-danger">*</span> </h4> diff --git a/addons/survey/views/survey_templates_user_input_session.xml b/addons/survey/views/survey_templates_user_input_session.xml index 0ff8748032a..005dd879bb2 100644 --- a/addons/survey/views/survey_templates_user_input_session.xml +++ b/addons/survey/views/survey_templates_user_input_session.xml @@ -125,6 +125,11 @@ <div class="progress"> <div class="progress-bar font-weight-bold" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div> </div> + <fieldset disabled="disabled" class="mt-5" t-if="question.question_type == 'matrix'" t-call="survey.question_container"> + <t t-set="hide_question_title" t-value="true" /> + <t t-set="answer" t-value="env['survey.user_input']" /> + <t t-set="survey_form_readonly" t-value="True"/> + </fieldset> </div> </div> </div> |
