diff options
| author | qmo-odoo <qmo@odoo.com> | 2019-05-08 13:08:18 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2019-08-08 08:29:34 +0000 |
| commit | 340613d068d9a6a06eb5e126d8c3e935f99babff (patch) | |
| tree | 473458022d1b3c24396dfaf84b11bfe31550e614 /addons/website_slides_survey/views | |
| parent | b180c66a80ae3ae34716f8524a990c9e9d2c1aa7 (diff) | |
[REF] website_slides: revamp channel form view
PURPOSE
Like already done for sale order, invoice of survey, purpose of this commit
is to remove category model and replace by a flagged line (slide). It allows
to easily reorder slides in an embedded list view.
SPECIFICATIONS
This commit completely reworks the slide.channel form view
* improve the content management from the form itself by adding a tree view
with the possibility of drag and dropping slides from category to category.
This tree view has buttons to quickly add content or certification. It
also allow to add a category (slide with flag is_category) without opening
a modal;
* reorder tabs and fields, improve some labels;
* add a custom float field widget to display ratings as stars;
* add stat button for partners who completed/certified ;the course
* add stat button that redirects to the forum posts;
* add stat button that redirects to the channel reviews;
LINKS
Task 1978731
PR #33255
Diffstat (limited to 'addons/website_slides_survey/views')
| -rw-r--r-- | addons/website_slides_survey/views/slide_channel_views.xml | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/addons/website_slides_survey/views/slide_channel_views.xml b/addons/website_slides_survey/views/slide_channel_views.xml index e3e094a41bd..417e9006ba0 100644 --- a/addons/website_slides_survey/views/slide_channel_views.xml +++ b/addons/website_slides_survey/views/slide_channel_views.xml @@ -5,8 +5,18 @@ <field name="model">slide.channel</field> <field name="inherit_id" ref="website_slides.view_slide_channel_form"/> <field name="arch" type="xml"> - <xpath expr="//field[@name='total_slides']" position="before"> - <field name="nbr_certification"/> + <xpath expr="//span[@name='stat_label']" position="replace"> + <span class="o_stat_text" attrs="{'invisible': [('nbr_certification', '>', 0)]}">Finished</span> + <span class="o_stat_text" attrs="{'invisible': [('nbr_certification', '=', 0)]}">Certified</span> + </xpath> + <xpath expr="//field[@name='nbr_webpage']" position="after"> + <field string="Certifications" name="nbr_certification"/> + </xpath> + <xpath expr="//field[@name='slide_type']" position="after"> + <field name="survey_id"/> + </xpath> + <xpath expr="//create[@name='add_slide_lesson']" position="after"> + <create name="add_slide_certificate" string="Add Certification" groups="survey.group_survey_user" context="{'default_slide_type': 'certification'}"/> </xpath> </field> </record> |
