| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <odoo> |
| 3 | <data> |
| 4 | <template id="slide_content_detailed" inherit_id="website_slides.slide_content_detailed"> |
| 5 | <xpath expr="//div[hasclass('o_wslides_lesson_content_type')]" position="inside"> |
| 6 | <div t-if="slide.slide_category == 'certification' and not channel_progress[slide.id].get('completed')" class="col mt32 mb8 text-center"> |
| 7 | <a role="button" |
| 8 | class="btn btn-primary btn-lg" |
| 9 | id="start_certification" |
| 10 | t-att-href="'/slides_survey/slide/get_certification_url?slide_id=%s' %(slide.id)" |
| 11 | target="_blank"> |
| 12 | <i class="fa fa-fw fa-graduation-cap" role="img"/> |
| 13 | <t t-if="slide.channel_id.is_member and slide.channel_id.active">Begin Certification</t> |
| 14 | <t t-else="">Test Certification</t> |
| 15 | </a> |
| 16 | </div> |
| 17 | <div t-if="slide.slide_category == 'certification' and channel_progress[slide.id].get('completed')" class="col mt32 mb8 text-center"> |
| 18 | <h4 class="mb-3">Congratulations, you passed the Certification!</h4> |
| 19 | <a role="button" class="btn btn-primary btn-lg" t-att-href="'/survey/%s/get_certification' % slide.survey_id.id"> |
| 20 | <i class="fa fa-fw fa-trophy" role="img" aria-label="Download certification" title="Download certification"/> Download certification |
| 21 | </a> |
| 22 | </div> |
| 23 | <div t-if="slide.slide_category == 'certification' and slide.channel_id.can_upload" class="col mb8 d-flex justify-content-center"> |
| 24 | <a class="my-4" t-att-href="'/odoo/survey.survey/' + str(slide.survey_id.id)"> |
| 25 | <i class="oi oi-arrow-right me-1"/>Add Questions to this Survey |
| 26 | </a> |
| 27 | </div> |
| 28 | </xpath> |
| 29 | <xpath expr="//a[hasclass('o_wslides_done_button')][1]" position="after"> |
| 30 | <a t-elif="not slide_completed and slide.slide_category == 'certification'" |
| 31 | role="button" |
| 32 | t-attf-class="o_wslides_done_button btn btn-primary border text-white me-2" |
| 33 | href="#start_certification"> |
| 34 | Take Quiz |
| 35 | </a> |
| 36 | </xpath> |
| 37 | <xpath expr="//a[hasclass('o_wslides_undone_button')][1]" position="after"> |
| 38 | <a t-elif="slide_completed and slide.slide_category == 'certification'" |
| 39 | class="o_wslides_undone_button btn btn-primary border text-white me-2 disabled" |
| 40 | aria-disabled="true" title="Certifications you have passed cannot be marked as not done"> |
| 41 | Mark To Do |
| 42 | </a> |
| 43 | </xpath> |
| 44 | </template> |
| 45 | </data> |
| 46 | </odoo> |