PURPOSE This commit adds some small UI improvements to the e-learning views. All those small changes are meant to improve the general user experience when adding content to a course. DETAILED SPECS - Change some placeholders / labels - Inform the end-user that he can edit his 'webpage' slide using the editor - Inform the end-user that he can add questions to his 'quiz' slide using the 'Quiz' tab in the backend form view - Do not update from slide metadata if field value is already set - Do not allow previews for certifications - "Allow Download" of slide content is now False by default As it was nice to have for "Documentation" courses but does not really make sense for "Training" ones. - Having a duplicate video id is now informative on the frontend and not blocking as before (it was allowed in the backend form anyway). - Show the video title in the frontend preview Task-2510174 Part-of: odoo/odoo#71477
33 lines
1.6 KiB
XML
33 lines
1.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="slide_slide_view_form" model="ir.ui.view">
|
|
<field name="name">slide.slide.view.form.inherit.survey</field>
|
|
<field name="model">slide.slide</field>
|
|
<field name="inherit_id" ref="website_slides.view_slide_slide_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='slide_category']" position="after">
|
|
<field name="survey_id"
|
|
attrs="{'invisible': [('slide_category', '!=', 'certification')], 'required': [('slide_category', '=', 'certification')]}"
|
|
domain="[('certification', '=', True)]" context="{'default_certification': True, 'default_scoring_type': 'scoring_without_answers'}"/>
|
|
</xpath>
|
|
<xpath expr="//field[@name='is_preview']" position="attributes">
|
|
<attribute name="attrs">{'invisible': [('slide_category', '=', 'certification')]}</attribute>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="slide_slide_action_certification" model="ir.actions.act_window">
|
|
<field name="name">Certifications</field>
|
|
<field name="res_model">slide.slide</field>
|
|
<field name="view_mode">tree,form,graph</field>
|
|
<field name="domain">[('slide_category', '=', 'certification')]</field>
|
|
<field name="context">{'default_slide_category': 'certification'}</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
Add a new certification
|
|
</p>
|
|
</field>
|
|
<field name="view_id" ref="website_slides.view_slide_slide_tree"/>
|
|
</record>
|
|
</odoo>
|