[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
This commit is contained in:
Aurélien Warnon
2020-03-31 15:12:06 +00:00
parent aaf3cb50c3
commit afd78f12ae
3 changed files with 25 additions and 17 deletions
+19 -16
View File
@@ -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 {
+1 -1
View File
@@ -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>
@@ -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>