*: website_event, website_form, website_sale Part of https://github.com/odoo/odoo/pull/55089 task-2157252 closes odoo/odoo#55089 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
77 lines
3.7 KiB
XML
77 lines
3.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<!-- Snippet - Country Events - Placeholder -->
|
|
<template id="s_country_events" name="Events">
|
|
<div t-attf-class="s_country_events_list oe_country_events #{_classes}">
|
|
<div class="country_events_list">
|
|
<h6 class="o_wevent_sidebar_title">
|
|
<i class="fa fa-globe mr-2"/>Upcoming Events
|
|
</h6>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<!-- Snippet - Country Events - List -->
|
|
<template id="country_events_list" name="Country Events List">
|
|
<div class="country_events_list">
|
|
<t t-if="events">
|
|
<h6 class="o_wevent_sidebar_title">
|
|
<t t-if="country">
|
|
<i class="fa fa-flag mr-2"/>Events: <span t-esc="country.name"/>
|
|
<img class="img-fluid" t-att-src="website.image_url(country, 'image')" alt=""/>
|
|
</t>
|
|
<t t-else="">
|
|
<i class="fa fa-globe mr-2"/>Upcoming Events
|
|
</t>
|
|
</h6>
|
|
<ul class="list-group mb-3">
|
|
<li t-foreach="events[:5]" t-as="event_dict" class="list-group-item d-flex justify-content-between">
|
|
<a t-att-href="event_dict['url']">
|
|
<i t-if="not event_dict['event'].website_published" class="fa fa-ban text-danger mr-1" role="img" aria-label="Unpublished" title="Unpublished"/>
|
|
<span t-esc="event_dict['event'].name" t-attf-class="#{(not event_dict['event'].website_published) and 'text-danger' or ''}"/>
|
|
</a>
|
|
<span t-esc="event_dict['date']"/>
|
|
</li>
|
|
</ul>
|
|
<div t-if="len(events) > 5">
|
|
<t t-if="country">
|
|
<a t-attf-href="/event?country=#{country.id}" class="small"><b>See all events from <span t-esc="country.name"/></b></a>
|
|
</t>
|
|
<t t-else="">
|
|
<a href="/event" class="small"><b>View all</b></a>
|
|
</t>
|
|
</div>
|
|
</t>
|
|
</div>
|
|
</template>
|
|
|
|
<!-- Snippets and options -->
|
|
<template id="snippets" inherit_id="website.snippets">
|
|
<xpath expr="//t[@id='event_local_events_hook']" position="replace">
|
|
<t t-snippet="website_event.s_country_events" t-thumbnail="/website_event/static/src/img/snippets_thumbs/s_country_events.svg"/>
|
|
</xpath>
|
|
<xpath expr="//t[@id='event_speaker_bio_hook']" position="replace">
|
|
<t t-snippet="website_event.s_speaker_bio" t-thumbnail="/website_event/static/src/img/snippets_thumbs/s_speaker_bio.svg"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="snippet_options" inherit_id="website.snippet_options">
|
|
<xpath expr="//*[@t-set='so_content_addition_selector']" position="inside">, .oe_country_events, .s_speaker_bio</xpath>
|
|
</template>
|
|
|
|
<!-- Snippet - Speaker Bio -->
|
|
<template id="s_speaker_bio" name="Speaker Bio">
|
|
<div class="s_speaker_bio" itemscope="itemscope" itemtype="http://schema.org/Person" itemprop="performer">
|
|
<span class="badge badge-secondary text-uppercase o_wevent_badge">Speaker</span>
|
|
<img src="/website_event/static/src/img/speaker.png" width="70" class="img-fluid rounded-circle float-left mr-3" alt=""/>
|
|
<div class="overflow-hidden">
|
|
<h4 class="mt-3 mb-1" itemprop="name">John DOE</h4>
|
|
<h6 class="mb-4">Company</h6>
|
|
<p>At just 13 years old, John DOE was already starting to develop his first business applications for customers. After mastering civil engineering, he founded TinyERP. This was the first phase of OpenERP which would later became Odoo, the most installed open-source business software worldwide.</p>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
</odoo>
|