[FIX] website_slides_survey: go to survey if only one slide certification
Purpose of this commit: In case there is only one slide in the course and that unique slide is of type certification, clicking on the link redirects the user to the survey page instead of the fullscreen view Task-1946511 closes odoo/odoo#31843 Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
This commit is contained in:
@@ -6,5 +6,11 @@
|
||||
<i t-if="slide.slide_type == 'certification'" t-att-class="'fa fa-trophy %s' % icon_class"></i>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="course_slides_list_slide_inherit_survey" inherit_id="website_slides.course_slides_list_slide">
|
||||
<xpath expr="//a[hasclass('o_wslides_js_slides_list_slide_link')]" position="attributes">
|
||||
<attribute name="t-attf-href">#{'/slides_survey/slide/get_certification_url?slide_id=%s' %(slide.id) if slide.slide_type == 'certification' and slide.channel_id.total_slides == 1 else '/slides/slide/%s' %(slug(slide))}</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user