Skip to content
Snippets Groups Projects
Commit add45ee4 authored by qmo-odoo's avatar qmo-odoo Committed by jem-odoo
Browse files

[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: default avatarJérome Maes (jem) <jem@openerp.com>
parent e8e8d7a9
Branches
Tags
No related merge requests found
......@@ -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>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment