Skip to content
Permalink
Browse files

[REF] website_event: no use of cards to wrap menus

  • Loading branch information...
qsm-odoo committed Mar 18, 2019
1 parent 31983e0 commit 88ca4a350f90c77075649b7774f35993e4d76bfc
Showing with 34 additions and 46 deletions.
  1. +34 −46 addons/website_event/views/event_templates.xml
@@ -133,62 +133,50 @@

<template id="event_time" active="True" customize_show="True" inherit_id="website_event.event_left_column" name="Filter by Date">
<xpath expr="//div[@id='left_column']" position="inside">
<div class="card mb-3">
<div class="card-body">
<ul class="nav nav-pills flex-column">
<t t-foreach="dates" t-as="date">
<li class="nav-item" t-if="date[3] or (date[0] in ('old','all'))">
<a t-attf-href="/event?{{ keep_query('country', 'type', date=date[0]) }}" t-attf-class="nav-link d-flex align-items-center #{searches.get('date') == date[0] and ' active' or ''}"><t t-esc="date[1]"/>
<span t-if="date[3]" class="badge badge-primary ml-auto"><t t-esc="date[3]"/></span>
</a>
</li>
</t>
</ul>
</div>
</div>
<ul class="nav nav-pills flex-column mb-3">
<t t-foreach="dates" t-as="date">
<li class="nav-item" t-if="date[3] or (date[0] in ('old','all'))">
<a t-attf-href="/event?{{ keep_query('country', 'type', date=date[0]) }}" t-attf-class="nav-link d-flex align-items-center #{searches.get('date') == date[0] and ' active' or ''}"><t t-esc="date[1]"/>
<span t-if="date[3]" class="badge badge-primary ml-auto"><t t-esc="date[3]"/></span>
</a>
</li>
</t>
</ul>
</xpath>
</template>

<template id="event_category" inherit_id="website_event.event_left_column" active="False" customize_show="True" name="Filter by Category">
<xpath expr="//div[@id='left_column']" position="inside">
<div class="card mb-3">
<div class="card-body">
<ul class="nav nav-pills flex-column">
<t t-foreach="types" t-as="type">
<li t-if="type['event_type_id']"
class="nav-item">
<a t-attf-href="/event?{{ keep_query('country', 'date', type=type['event_type_id'][0]) }}" t-attf-class="nav-link d-flex align-items-center #{searches.get('type') == str(type['event_type_id'] and type['event_type_id'][0]) and ' active' or ''}"><t t-esc="type['event_type_id'][1]"/>
<span class="badge badge-primary ml-auto"><t t-esc="type['event_type_id_count']"/></span>
</a>
</li>
</t>
</ul>
</div>
</div>
<ul class="nav nav-pills flex-column mb-3">
<t t-foreach="types" t-as="type">
<li t-if="type['event_type_id']"
class="nav-item">
<a t-attf-href="/event?{{ keep_query('country', 'date', type=type['event_type_id'][0]) }}" t-attf-class="nav-link d-flex align-items-center #{searches.get('type') == str(type['event_type_id'] and type['event_type_id'][0]) and ' active' or ''}"><t t-esc="type['event_type_id'][1]"/>
<span class="badge badge-primary ml-auto"><t t-esc="type['event_type_id_count']"/></span>
</a>
</li>
</t>
</ul>
</xpath>
</template>

<template id="event_location" inherit_id="website_event.event_left_column" active="False" customize_show="True" name="Filter by Country">
<xpath expr="//div[@id='left_column']" position="inside">
<div class="card mb-3">
<div class="card-body">
<ul class="nav nav-pills flex-column">
<t t-foreach="countries" t-as="country">
<li t-if="country['country_id']" class="nav-item">
<a t-attf-href="/event?{{ keep_query('type', 'date', country=country['country_id'][0]) }}" t-attf-class="nav-link d-flex align-items-center #{searches.get('country') == str(country['country_id'] and country['country_id'][0]) and ' active' or ''}"><t t-esc="country['country_id'][1]"/>
<span class="badge badge-primary ml-auto"><t t-esc="country['country_id_count']"/></span>
</a>
</li>
<li t-if="not country['country_id']" class="nav-item">
<a t-attf-href="/event?{{ keep_query('type', 'date', country='online') }}" t-attf-class="nav-link d-flex align-items-center #{searches.get('country') == 'online' and ' active' or ''}">
<span>Online Events</span>
<span class="badge badge-primary ml-auto"><t t-esc="country['country_id_count']"/></span>
</a>
</li>
</t>
</ul>
</div>
</div>
<ul class="nav nav-pills flex-column mb-3">
<t t-foreach="countries" t-as="country">
<li t-if="country['country_id']" class="nav-item">
<a t-attf-href="/event?{{ keep_query('type', 'date', country=country['country_id'][0]) }}" t-attf-class="nav-link d-flex align-items-center #{searches.get('country') == str(country['country_id'] and country['country_id'][0]) and ' active' or ''}"><t t-esc="country['country_id'][1]"/>
<span class="badge badge-primary ml-auto"><t t-esc="country['country_id_count']"/></span>
</a>
</li>
<li t-if="not country['country_id']" class="nav-item">
<a t-attf-href="/event?{{ keep_query('type', 'date', country='online') }}" t-attf-class="nav-link d-flex align-items-center #{searches.get('country') == 'online' and ' active' or ''}">
<span>Online Events</span>
<span class="badge badge-primary ml-auto"><t t-esc="country['country_id_count']"/></span>
</a>
</li>
</t>
</ul>
</xpath>
</template>

0 comments on commit 88ca4a3

Please sign in to comment.
You can’t perform that action at this time.