[IMP] survey: UI Preening

Purpose
=======

Keep iterating on the UI & Onboarding of Survey as we plan to massively
distribute it with the new Saas formula (installed by default).

Specs
=======
* Changed the look and feel of the Action Helper inside the Surveys
* Changed the Default Feedback Form: end message modified and two layers
removed

task-2901947

closes odoo/odoo#101507

X-original-commit: 6280f160d77e3c1777516fbfd2e225e13642872b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Thomas Josse (thjo)
2022-09-28 21:26:47 +02:00
parent 385fc1c7eb
commit f4f61a4b5e
3 changed files with 14 additions and 24 deletions
@@ -18,14 +18,13 @@ class SurveyTemplate(models.Model):
@api.model
def action_load_sample_feedback_form(self):
company = self.env.user.company_id.name
return self.env['survey.survey'].create({
'title': _('Feedback Form'),
'description': '<br>'.join([
_('Please complete this very short survey to let us know how satisfied your are with our products.'),
_('Your responses will help us improve our product range to serve you even better.')
]),
'description_done': _('Thank you very much for your feedback. We at %s value your opinion very highly!', company),
'description_done': _('Thank you very much for your feedback. We highly value your opinion !'),
'progression_mode': 'number',
'questions_layout': 'page_per_question',
'question_and_page_ids': [
@@ -54,9 +53,6 @@ class SurveyTemplate(models.Model):
'question_type': 'matrix',
'matrix_subtype': 'simple',
'suggested_answer_ids': [
(0, 0, { # survey.question.answer
'value': _('Very Unlikely')
}),
(0, 0, { # survey.question.answer
'value': _('Unlikely')
}),
@@ -66,9 +62,6 @@ class SurveyTemplate(models.Model):
(0, 0, { # survey.question.answer
'value': _('Likely')
}),
(0, 0, { # survey.question.answer
'value': _('Very Likely')
})
],
'matrix_row_ids': [
(0, 0, { # survey.question.answer
@@ -11,9 +11,9 @@ tour.register('survey_tour', {
}, [
...tour.stepUtils.goToAppSteps('survey.menu_surveys', Markup(_t("Ready to change the way you <b>gather data</b>?"))),
{
trigger: 'body:has(.o_survey_load_sample) .o_survey_sample_container',
trigger: '.btn-outline-primary.o_survey_load_sample',
content: Markup(_t("Load a <b>sample Survey</b> to get started quickly.")),
position: 'bottom',
position: 'left',
}, {
trigger: 'button[name=action_test_survey]',
content: _t("Let's give it a spin!"),
+11 -14
View File
@@ -390,52 +390,49 @@
<field name="res_model">survey.survey</field>
<field name="view_mode">kanban,tree,form,activity</field>
<field name="help" type="html">
<p>
No Survey Found
</p><p>
Ready to test? Pick a sample...
</p>
<div class="row mb-4">
<div class="col-sm-4 o_survey_sample_container" action="action_load_sample_feedback_form">
<div class="o_survey_sample_tile position-relative w-100 d-flex align-items-center justify-content-center m-auto">
<img src="/survey/static/src/img/survey_sample_feedback_form.png" class="img-fluid"/>
<div class="o_survey_sample_tile_cover o_survey_load_sample w-100 h-100 position-absolute rounded-circle text-center text-white p-3">
Gather feedbacks from your employees and customers.
Gather feedbacks from your employees and customers
</div>
</div>
<div class="my-3">
<a class="o_survey_load_sample h3 text-center text-primary">Feedback Form</a>
</div>
<a class="btn btn-primary o_survey_load_sample text-white"><span>Try It</span></a>
<a class="btn btn-outline-primary o_survey_load_sample"><span>Try It</span></a>
</div>
<div class="col-sm-4 o_survey_sample_container" action="action_load_sample_certification">
<div class="o_survey_sample_tile position-relative w-100 d-flex align-items-center justify-content-center m-auto">
<img src="/survey/static/src/img/survey_sample_certification.png" class="img-fluid"/>
<div class="o_survey_sample_tile_cover o_survey_load_sample w-100 h-100 position-absolute rounded-circle text-center text-white p-3">
Handle quiz &amp; certifications online.
Handle quiz &amp; certifications
</div>
</div>
<div class="my-3">
<a class="o_survey_load_sample h3 text-center text-primary">Certification</a>
</div>
<a class="btn btn-primary o_survey_load_sample text-white"><span>Try It</span></a>
<a class="btn btn-outline-primary o_survey_load_sample"><span>Try It</span></a>
</div>
<div class="col-sm-4 o_survey_sample_container" action="action_load_sample_live_presentation">
<div class="o_survey_sample_tile position-relative w-100 d-flex align-items-center justify-content-center m-auto">
<img src="/survey/static/src/img/survey_sample_live_presentation.png" class="img-fluid"/>
<div class="o_survey_sample_tile_cover o_survey_load_sample w-100 h-100 position-absolute rounded-circle text-center text-white p-3">
Add some fun to your presentations by sharing questions live.
Add some fun to your presentations by sharing questions live
</div>
</div>
<div class="my-3">
<a class="o_survey_load_sample h3 text-center text-primary">Live Presentation</a>
</div>
<a class="btn btn-primary o_survey_load_sample text-white"><span>Try It</span></a>
<a class="btn btn-outline-primary o_survey_load_sample"><span>Try It</span></a>
</div>
</div>
<p>
Create a Survey
</p>
<p>
Surveys can serve many purposes: collect customer feedback, gather market insights, structure employee evaluations, test and certify resellers, support a live presentation, ...
</p><p>
Not sure where to start? Try a sample Survey!
</p>
</field>
</record>