104 lines
6.5 KiB
XML
104 lines
6.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<template id="index_topbar" inherit_id="website_event.index_topbar">
|
|
<xpath expr="//div[hasclass('o_wevent_index_topbar_filters')]" position="inside">
|
|
<t t-call="website_sale.pricelist_list">
|
|
<t t-set="_classes" t-valuef="d-none d-lg-inline me-2 my-1"/>
|
|
</t>
|
|
</xpath>
|
|
</template>
|
|
|
|
<!-- If the sale order line concerns an event, we want the "product" link to point to the event itself and not to the product on the ecommerce -->
|
|
<template id="cart_line_product_link_inherit_website_event_sale" inherit_id="website_sale.cart_line_product_link" name="Event Shopping Cart Line Product Link">
|
|
<xpath expr="//a" position="attributes">
|
|
<attribute name="t-attf-href"/>
|
|
<attribute name="t-att-href">
|
|
line.event_id and ('/event/%s/register' % slug(line.event_id)) or line.product_id.website_url
|
|
</attribute>
|
|
</xpath>
|
|
</template>
|
|
|
|
<!-- If the sale order line concerns an event, we want to show an additional line with the event name even on small screens -->
|
|
<template id="cart_lines_inherit_website_event_sale" inherit_id="website_sale.cart_lines" name="Event Shopping Cart Lines">
|
|
<xpath expr="//t[@t-call='website_sale.cart_line_description_following_lines']/t[@t-set='div_class']" position="after">
|
|
<t t-if="line.event_id">
|
|
<t t-set="div_class" t-value="''"/>
|
|
</t>
|
|
</xpath>
|
|
<xpath expr="//del" position="attributes">
|
|
<attribute name="t-attf-class" separator=" " add="#{line.event_id and 'd-none' or ''}"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<!-- If the sale order line concerns an event, we want to show an additional line with the event name -->
|
|
<template id="cart_summary_inherit_website_event_sale" inherit_id="website_sale.checkout_layout" name="Event Cart right column">
|
|
<xpath expr="//td[@name='website_sale_cart_summary_product_name']/h6" position="after">
|
|
<t t-if="line.event_id" t-call="website_sale.cart_line_description_following_lines"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="event_confirmation" inherit_id="website_sale.confirmation">
|
|
<xpath expr="//div[@id='oe_structure_website_sale_confirmation_2']" position="inside">
|
|
<t t-if="events">
|
|
<section class="s_title pt40 mb-3" data-snippet="s_title" data-name="Title">
|
|
<div class="s_allow_columns container">
|
|
<h4>
|
|
We are looking forward to meeting you at the following <t t-if="len(events) == 1">event</t><t t-else="">events</t>:
|
|
</h4>
|
|
</div>
|
|
</section>
|
|
<section class="card mb-5" t-foreach="events" t-as="event">
|
|
<t t-set="attendees" t-value="attendee_ids_per_event.get(event, [])"/>
|
|
<div class="s_nb_column_fixed s_col_no_bgcolor o_wevent_index o_wevent_sale_event">
|
|
<t t-set="opt_event_description_cover_top" t-value="is_view_active('website_event.opt_event_description_cover_top')"/>
|
|
<t t-call="website.record_cover">
|
|
<t t-set="_record" t-value="event"/>
|
|
<t t-set="use_filters" t-value="True"/>
|
|
<t t-set="use_size" t-value="True"/>
|
|
<t t-set="use_text_align" t-value="True"/>
|
|
<t t-set="additionnal_classes" t-value="'o_wevent_event_main_cover o_wevent_event_main_cover_top overflow-hidden h-auto'"/>
|
|
|
|
<div t-attf-class="o_wevent_event_date position-absolute shadow-sm o_not_editable">
|
|
<span t-out="event.date_begin" t-options="{'widget': 'datetime', 'tz_name': event.date_tz, 'format': 'LLL'}" class="o_wevent_event_month"/>
|
|
<span t-out="event.date_begin" t-options="{'widget': 'datetime', 'tz_name': event.date_tz, 'format': 'dd'}" class="o_wevent_event_day oe_hide_on_date_edit"/>
|
|
</div>
|
|
|
|
<div class="container d-flex flex-grow-1 h-100 w-100">
|
|
<div id="o_wevent_event_main_cover_content" class="d-flex flex-column align-items-baseline w-100 p-3">
|
|
<span t-if="event.is_participating" class="badge text-bg-success o_wevent_badge">
|
|
<i class="fa fa-check me-2" role="img"/>Registered
|
|
</span>
|
|
<div class="w-100 mt-auto">
|
|
<h2 t-field="event.name" itemprop="name" placeholder="Event Title" class="mt-3"/>
|
|
<p class="lead" t-field="event.subtitle" placeholder="Event Subtitle"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
<div class="m-3">
|
|
<t t-if="attendees" t-call="website_event.registration_ticket_access"/>
|
|
<div class="row my-3">
|
|
<h5>Don't miss out!</h5>
|
|
<small>Add this event to your calendar</small>
|
|
<div id="add_to_calendar" class="o_event_add_to_calendar_btns d-flex flex-wrap gap-3 mt-2">
|
|
<a role="button" class="o_outlook_calendar btn btn-block bg-white" t-att-href="urls_per_event.get(event.id, {}).get('iCal_url', '')">
|
|
<img src="/event/static/src/img/outlook-calendar.svg" alt="Outlook" loading="lazy"/>
|
|
Add to iCal/Outlook
|
|
</a>
|
|
<a role="button" class="o_google_calendar btn btn-block bg-white" t-att-href="urls_per_event.get(event.id, {}).get('google_url', '')">
|
|
<img src="/event/static/src/img/google-calendar.svg" alt="Google Agenda" loading="lazy"/>
|
|
Add to Google Agenda
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<t t-call="website_event.event_confirmation_end_page_hook"/>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</t>
|
|
</xpath>
|
|
</template>
|
|
|
|
</odoo>
|