123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325 |
- <?xml version="1.0" encoding="utf-8"?>
- <odoo>
- <!-- Index -->
- <template id="index" name="Events" track="1">
- <t t-call="website.layout">
- <div id="wrap" class="o_wevent_index">
- <!-- Options -->
- <t t-set="opt_events_list_cards" t-value="is_view_active('website_event.opt_events_list_cards')"/>
- <t t-set="opt_events_list_columns" t-value="is_view_active('website_event.opt_events_list_columns')"/>
- <!-- Topbar -->
- <t t-call="website_event.index_topbar">
- <t t-set="search" t-value="original_search or search or searches['search']"/>
- </t>
- <!-- Drag/Drop Area -->
- <div id="oe_structure_we_index_1" class="oe_structure oe_empty"/>
- <!-- Content -->
- <div class="o_wevent_events_list">
- <div class="container">
- <div class="d-flex mx-n3">
- <t t-call="website_event.searched_tags"/>
- </div>
- <div class="row">
- <div id="o_wevent_index_main_col" t-attf-class="col-md my-5 #{opt_events_list_columns and 'opt_events_list_columns' or 'opt_events_list_rows'}">
- <div class="row">
- <!-- Events List -->
- <t t-call="website_event.events_list"/>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- Drag/Drop Area -->
- <div id="oe_structure_we_index_2" class="oe_structure oe_empty"/>
- </div>
- </t>
- </template>
- <!-- Index - OPTION - Sidebar -->
- <template id="opt_index_sidebar" inherit_id="website_event.index" active="False" name="Show Sidebar">
- <xpath expr="//div[@id='o_wevent_index_main_col']" position="after">
- <t t-call="website_event.index_sidebar"/>
- </xpath>
- </template>
- <!-- Index Topbar -->
- <template id="index_topbar" name="Topbar">
- <nav class="navbar navbar-light border-top shadow-sm d-print-none">
- <div class="container">
- <div class="d-flex flex-column flex-sm-row justify-content-between w-100">
- <span class="navbar-brand h4 my-0 me-auto">Events</span>
- <ul class="o_wevent_index_topbar_filters nav">
- <t t-foreach="categories" t-as="category">
- <li t-if="category.is_published and category.tag_ids and any(tag.color for tag in category.tag_ids)" class="nav-item dropdown me-2 my-1">
- <a href="#" role="button" class="btn dropdown-toggle" data-bs-toggle="dropdown">
- <i class="fa fa-folder-open"/>
- <t t-out="category.name"/>
- </a>
- <div class="dropdown-menu">
- <t t-foreach="category.tag_ids" t-as="tag">
- <a t-if="tag.color"
- t-att-href="'/event?%s' % keep_query('*', tags=str((search_tags - tag).ids if tag in search_tags else (tag | search_tags).ids))"
- t-attf-class="dropdown-item d-flex align-items-center justify-content-between #{'active' if tag in search_tags else ''}">
- <t t-out="tag.name"/>
- </a>
- </t>
- </div>
- </li>
- </t>
- </ul>
- <div class="d-flex align-items-center flex-wrap ps-sm-3 pe-0">
- <t t-call="website_event.events_search_box_input"/>
- </div>
- </div>
- </div>
- </nav>
- </template>
- <template id="searched_tags" name="Searched tags">
- <div class="d-flex align-items-center mt16">
- <t t-foreach="search_tags" t-as="tag">
- <span t-attf-class="align-items-baseline border d-inline-flex ps-2 rounded ml16 mb-2 #{'o_tag_color_%s' % tag.color if tag.color else ''}">
- <i class="fa fa-tag me-2 text-muted"/>
- <t t-out="tag.display_name"/>
- <a t-att-href="'/event?%s' % keep_query('*', tags=str((search_tags - tag).ids))" class="btn border-0 py-1">×</a>
- </span>
- </t>
- </div>
- </template>
- <!-- Filter - Date -->
- <template id="event_time" inherit_id="website_event.index_topbar" name="Filter by Date">
- <xpath expr="//ul[hasclass('o_wevent_index_topbar_filters')]" position="inside">
- <li class="nav-item dropdown me-2 my-1">
- <a href="#" role="button" class="btn dropdown-toggle" data-bs-toggle="dropdown">
- <i class="fa fa-calendar"/>
- <t t-if="current_date" t-out="current_date"/>
- <t t-else="">Upcoming Events</t>
- </a>
- <div class="dropdown-menu">
- <t t-foreach="dates" t-as="date">
- <t t-if="date[3] or (date[0] in ('old','upcoming','all'))">
- <a t-att-href="keep('/event', date=date[0])" t-attf-class="dropdown-item d-flex align-items-center justify-content-between #{searches.get('date') == date[0] and 'active'}">
- <t t-out="date[1]"/>
- <span t-if="date[3]" t-out="date[3]" t-attf-class="badge rounded-pill #{searches.get('date') == date[0] and 'bg-light text-primary' or 'bg-primary'} ms-3"/>
- </a>
- </t>
- </t>
- </div>
- </li>
- </xpath>
- </template>
- <!-- Filter - Location -->
- <template id="event_location" inherit_id="website_event.index_topbar" active="False" name="Filter by Country">
- <xpath expr="//ul[hasclass('o_wevent_index_topbar_filters')]" position="inside">
- <li class="nav-item dropdown me-2 my-1">
- <a href="#" role="button" class="btn dropdown-toggle" data-bs-toggle="dropdown">
- <i class="fa fa-map-marker"/>
- <t t-if="current_country" t-out="current_country.name"/>
- <t t-else="">All countries</t>
- </a>
- <div class="dropdown-menu">
- <t t-foreach="countries" t-as="country">
- <t t-if="country['country_id']">
- <a t-att-href="keep('/event', country=country['country_id'][0])" t-attf-class="dropdown-item d-flex align-items-center justify-content-between #{searches.get('country') == str(country['country_id'] and country['country_id'][0]) and 'active'}">
- <t t-out="country['country_id'][1]"/>
- <span t-out="country['country_id_count']" class="badge rounded-pill text-bg-primary ms-auto"/>
- </a>
- </t>
- <t t-else="">
- <a t-att-href="keep('/event', country='online')" t-attf-class="dropdown-item d-flex align-items-center justify-content-between #{searches.get('country') == 'online' and 'active'}">
- <span>Online Events</span>
- <span t-out="country['country_id_count']" class="badge rounded-pill text-bg-primary ms-3"/>
- </a>
- </t>
- </t>
- </div>
- </li>
- </xpath>
- </template>
- <!-- Index - Events list -->
- <template id="events_list" name="Events list">
- <!-- Options -->
- <t t-set="opt_index_sidebar" t-value="is_view_active('website_event.opt_index_sidebar')"/>
- <t t-if="opt_events_list_columns" t-set="opt_event_size" t-value="opt_index_sidebar and 'col-md-6' or 'col-md-6 col-lg-4'"/>
- <t t-else="" t-set="opt_event_size" t-value="opt_index_sidebar and 'col-12' or 'col-xl-10 offset-xl-1'"/>
- <!-- No events -->
- <t t-if="not event_ids">
- <div class="col-12">
- <div class="h2 mb-3">No events found.</div>
- <div class="alert alert-info text-center" groups="event.group_event_user">
- <p class="m-0">Use the top button '<b>+ New</b>' to create an event.</p>
- </div>
- </div>
- </t>
- <!-- Fuzzy search -->
- <div t-if="event_ids and original_search" class="col-12 alert alert-warning mt8">
- No results found for '<span t-out="original_search"/>'. Showing results for '<span t-out="searches['search']"/>'.
- </div>
- <!-- List -->
- <div t-foreach="event_ids" t-as="event" t-attf-class=" #{opt_event_size} mb-4">
- <a t-cache="event if not editable and event.website_published else None" t-attf-href="/event/#{ slug(event) }/#{(not event.menu_id) and 'register'}" class="text-decoration-none" t-att-data-publish="event.website_published and 'on' or 'off'">
- <article t-attf-class="h-100 #{opt_events_list_cards and 'card border-0 shadow-sm'}" itemscope="itemscope" itemtype="http://schema.org/Event">
- <div class="h-100 row g-0">
- <!-- Header -->
- <header t-attf-class="overflow-hidden bg-secondary #{opt_events_list_columns and 'col-12' or 'col-sm-4 col-lg-3'} #{(not opt_events_list_cards) and 'shadow'}">
- <!-- Image + Link -->
- <div class="d-block h-100 w-100">
- <t t-call="website.record_cover">
- <t t-set="_record" t-value="event"/>
- <!-- Short Date -->
- <div 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>
- <!-- Participating -->
- <small t-if="event.is_participating" class="o_wevent_participating text-bg-success">
- <i class="fa fa-check me-2"/>Registered
- </small>
- <!-- Unpublished -->
- <small t-if="not event.website_published" class="o_wevent_unpublished text-bg-danger">
- <i class="fa fa-ban me-2"/>Unpublished
- </small>
- </t>
- </div>
- </header>
- <div t-att-class="'%s %s position-relative' % (
- opt_events_list_columns and 'col-12' or 'col',
- opt_events_list_columns and event.event_registrations_open and not event.event_registrations_sold_out and 'h-100' or '')">
- <!-- Body -->
- <main t-attf-class="#{opt_events_list_cards and 'card-body' or (opt_events_list_columns and 'py-3' or 'px-4')}">
- <!-- Title -->
- <h5 t-attf-class="card-title mt-2 mb-0 text-truncate #{(not event.website_published) and 'text-danger'}">
- <span t-field="event.name" itemprop="name"/>
- </h5>
- <!-- Start Date & Time -->
- <time class="o_not_editable" itemprop="startDate" t-att-datetime="event.date_begin">
- <span t-out="event.date_begin"
- t-options="{'widget': 'datetime', 'tz_name': event.date_tz, 'date_only': 'true', 'format': 'long', 'tz_name': event.date_tz}"/> -
- <span t-out="event.date_begin"
- t-options="{'widget': 'datetime', 'tz_name': event.date_tz, 'time_only': 'true', 'format': 'short', 'tz_name': event.date_tz}"/>
- (<span t-out="event.date_tz"/>)
- </time>
- <!-- Location -->
- <div class="o_not_editable" itemprop="location" t-out="event.address_id" t-options="{'widget': 'contact', 'fields': ['city'], 'no_marker': 'true'}"/>
- <div class="mt8">
- <t t-foreach="event.tag_ids.filtered(lambda tag: tag.category_id.is_published)" t-as="tag">
- <span t-if="tag.color"
- t-attf-class="badge mr4 #{'bg-primary' if tag in search_tags else ''} #{'o_tag_color_%s' % tag.color if tag.color else ''}">
- <span t-out="tag.name"/>
- </span>
- </t>
- </div>
- </main>
- </div>
- <!-- Footer -->
- <footer t-if="not event.event_registrations_open or event.event_registrations_sold_out"
- t-att-class="'alert-secondary small align-self-end w-100 %s %s' % (
- opt_events_list_cards and 'card-footer' or (not opt_events_list_columns and 'mx-4 mt-auto pt-2') or 'py-2',
- opt_events_list_cards and 'border-top' or '',
- )">
- <span t-if="not event.event_registrations_open">
- <t t-if="not event.event_registrations_started">
- Registrations not yet open
- </t>
- <t t-elif="event.event_registrations_sold_out">
- Sold Out
- </t>
- <t t-else="">
- Registrations Closed
- </t>
- </span>
- </footer>
- </div>
- </article>
- </a>
- </div>
- <!-- Pager -->
- <div class="d-flex justify-content-center my-3">
- <t t-call="website.pager"/>
- </div>
- </template>
- <template id="opt_events_list_columns" inherit_id="website_event.events_list" active="True" name="Layout • Columns"/>
- <template id="opt_events_list_cards" inherit_id="website_event.events_list" active="True" name="'Cards' Design"/>
- <template id="opt_events_list_categories" inherit_id="website_event.events_list" active="False" name="Show Templates">
- <xpath expr="//main/*" position="before">
- <span t-if="event.event_type_id" t-attf-href="/event?type=#{event.event_type_id.id}" t-attf-class="badge bg-secondary o_wevent_badge #{opt_events_list_columns and 'o_wevent_badge_event' or 'float-end'}" t-field="event.event_type_id"/>
- </xpath>
- </template>
- <!-- Index - Sidebar -->
- <template id="index_sidebar" name="Sidebar">
- <div id="o_wevent_index_sidebar" class="col-lg-4 ms-lg-3 ms-xl-5 my-5"/>
- </template>
- <!-- Index - Sidebar - About us -->
- <template id="index_sidebar_about_us" inherit_id="website_event.index_sidebar" active="True" name="About us" priority="20">
- <xpath expr="//div[@id='o_wevent_index_sidebar']" position="inside">
- <div class="o_wevent_sidebar_block">
- <h6 class="o_wevent_sidebar_title">About us</h6>
- <p>Use this paragraph to write a short text about your events or company.</p>
- </div>
- <div id="oe_structure_website_event_about_us_1" class="oe_structure"/>
- </xpath>
- </template>
- <!-- Index - Sidebar - Follow us -->
- <template id="index_sidebar_follow_us" inherit_id="website_event.index_sidebar" active="False" name="Follow us" priority="30">
- <xpath expr="//div[@id='o_wevent_index_sidebar']" position="inside">
- <div class="o_wevent_sidebar_block">
- <h6 class="o_wevent_sidebar_title">Follow Us</h6>
- <div class="o_wevent_sidebar_social mx-n1">
- <a t-if="website.social_facebook" t-att-href="website.social_facebook" class="o_wevent_social_link"><i class="fa fa-facebook text-facebook" aria-label="Facebook" title="Facebook"/></a>
- <a t-if="website.social_twitter" t-att-href="website.social_twitter" class="o_wevent_social_link"><i class="fa fa-twitter text-twitter" aria-label="Twitter" title="Twitter"/></a>
- <a t-if="website.social_linkedin" t-att-href="website.social_linkedin" class="o_wevent_social_link"><i class="fa fa-linkedin text-linkedin" aria-label="LinkedIn" title="LinkedIn"/></a>
- <a t-if="website.social_youtube" t-att-href="website.social_youtube" class="o_wevent_social_link"><i class="fa fa-youtube-play text-youtube" aria-label="Youtube" title="Youtube"/></a>
- <a t-if="website.social_github" t-att-href="website.social_github" class="o_wevent_social_link"><i class="fa fa-github text-github" aria-label="Github" title="Github"/></a>
- <a t-if="website.social_instagram" t-att-href="website.social_instagram" class="o_wevent_social_link"><i class="fa fa-instagram text-instagram" aria-label="Instagram" title="Instagram"/></a>
- </div>
- </div>
- <div id="oe_structure_website_event_follow_us_1" class="oe_structure"/>
- </xpath>
- </template>
- <!-- Index - Sidebar - Photos -->
- <template id="index_sidebar_photos" inherit_id="website_event.index_sidebar" active="True" name="Photos" priority="40">
- <xpath expr="//div[@id='o_wevent_index_sidebar']" position="inside">
- <h6 class="o_wevent_sidebar_title">Photos</h6>
- <a href="/event">
- <figure class="o_wevent_sidebar_block o_wevent_sidebar_figure figure">
- <img class="figure-img img-fluid rounded" src="/website_event/static/src/img/event_past_0.jpg" alt=""/>
- <figcaption class="figure-caption">A past event</figcaption>
- </figure>
- </a>
- <a href="/event">
- <figure class="o_wevent_sidebar_block o_wevent_sidebar_figure figure">
- <img class="figure-img img-fluid rounded" src="/website_event/static/src/img/event_training_0.jpg" alt=""/>
- <figcaption class="figure-caption">Our Trainings</figcaption>
- </figure>
- </a>
- </xpath>
- </template>
- <!-- Index - Sidebar - Quotes -->
- <template id="index_sidebar_quotes" inherit_id="website_event.index_sidebar" active="True" name="Quotes" priority="60">
- <xpath expr="//div[@id='o_wevent_index_sidebar']" position="inside">
- <div class="o_wevent_sidebar_block card">
- <div class="card-body">
- <blockquote class="blockquote mb-0">
- <p><em>Write here a quote from one of your attendees. It gives confidence in your events.</em></p>
- <footer class="blockquote-footer text-muted">Author</footer>
- </blockquote>
- </div>
- </div>
- </xpath>
- </template>
- </odoo>
|