[FIX] website_slides: add missing presentation icon used in some templates
A specific template to display an icon depending on slide type has been added recently. However presentation icon was missing. This commit fixes that. We also added an option to tune the classes added on the icon. It gives more flexibility when using it. Commit linked to task ID 1941250 and PR #31453
This commit is contained in:
@@ -479,12 +479,14 @@
|
||||
</template>
|
||||
|
||||
<template id="slide_icon">
|
||||
<i t-if="slide.slide_type == 'document'" class="fa fa-file-pdf-o mr-2 text-muted"></i>
|
||||
<i t-if="slide.slide_type == 'infographic'" class="fa fa-file-picture-o mr-2 text-muted"></i>
|
||||
<i t-if="slide.slide_type == 'video'" class="fa fa-play-circle mr-2 text-muted"></i>
|
||||
<i t-if="slide.slide_type == 'link'" class="fa fa-file-code-o mr-2 text-muted"></i>
|
||||
<i t-if="slide.slide_type == 'webpage'" class="fa fa-file-text mr-2 text-muted"></i>
|
||||
<i t-if="slide.slide_type == 'quiz'" class="fa fa-question-circle mr-2 text-muted"></i>
|
||||
<t t-set="icon_class" t-value="icon_class if icon_class else 'mr-2 text-muted'"/>
|
||||
<i t-if="slide.slide_type == 'document'" t-att-class="'fa fa-file-pdf-o %s' % icon_class"></i>
|
||||
<i t-if="slide.slide_type == 'presentation'" t-att-class="'fa fa-file-pdf-o %s' % icon_class"></i>
|
||||
<i t-if="slide.slide_type == 'infographic'" t-att-class="'fa fa-file-picture-o %s' % icon_class"></i>
|
||||
<i t-if="slide.slide_type == 'video'" t-att-class="'fa fa-play-circle %s' % icon_class"></i>
|
||||
<i t-if="slide.slide_type == 'link'" t-att-class="'fa fa-file-code-o %s' % icon_class"></i>
|
||||
<i t-if="slide.slide_type == 'webpage'" t-att-class="'fa fa-file-text %s' % icon_class"></i>
|
||||
<i t-if="slide.slide_type == 'quiz'" t-att-class="'fa fa-question-circle %s' % icon_class"></i>
|
||||
</template>
|
||||
|
||||
</data></odoo>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<data>
|
||||
<template id="slide_icon_inherit_survey" inherit_id="website_slides.slide_icon">
|
||||
<xpath expr="//i[last()]" position="after">
|
||||
<i t-if="slide.slide_type == 'certification'" class="fa fa-trophy mr-2 text-muted"></i>
|
||||
<i t-if="slide.slide_type == 'certification'" t-att-class="'fa fa-trophy %s' % icon_class"></i>
|
||||
</xpath>
|
||||
</template>
|
||||
</data>
|
||||
|
||||
Reference in New Issue
Block a user