[FIX] website_event: show online in event in all country. Add filter online event. Keep the date between filter.
This commit is contained in:
parent
2f4be42d8c
commit
541cfc93a3
|
@ -90,9 +90,12 @@ class website_event(http.Controller):
|
|||
if searches["type"] != 'all':
|
||||
current_type = type_obj.browse(cr, uid, int(searches['type']), context=context)
|
||||
domain_search["type"] = [("type", "=", int(searches["type"]))]
|
||||
if searches["country"] != 'all':
|
||||
|
||||
if searches["country"] != 'all' and searches["country"] != 'online':
|
||||
current_country = country_obj.browse(cr, uid, int(searches['country']), context=context)
|
||||
domain_search["country"] = [("country_id", "=", int(searches["country"]))]
|
||||
domain_search["country"] = ['|', ("country_id", "=", int(searches["country"])), ("country_id", "=", False)]
|
||||
elif searches["country"] == 'online':
|
||||
domain_search["country"] = [("country_id", "=", False)]
|
||||
|
||||
def dom_without(without):
|
||||
domain = [('state', "in", ['draft','confirm','done'])]
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
<div class="media-body">
|
||||
<h4 class="media-heading">
|
||||
<a t-att-class="event.state == 'done' and 'text-success'" t-attf-href="/event/#{ slug(event) }/#{(not event.menu_id) and 'register/' or ''}"><span t-field="event.name"> </span></a>
|
||||
<small t-if="not event.address_id" class="label label-info">Online</small>
|
||||
<small t-if="not event.website_published" class="label label-danger">not published</small>
|
||||
</h4>
|
||||
<div>
|
||||
|
@ -162,7 +163,13 @@
|
|||
<ul class="nav nav-pills nav-stacked mt32">
|
||||
<t t-foreach="countries">
|
||||
<li t-if="country_id" t-att-class="searches.get('country') == str(country_id and country_id[0]) and 'active' or ''">
|
||||
<a t-attf-href="/event/?{{ keep_query('type', 'data', country=country_id[0]) }}"><t t-esc="country_id[1]"/>
|
||||
<a t-attf-href="/event/?{{ keep_query('type', 'date', country=country_id[0]) }}"><t t-esc="country_id[1]"/>
|
||||
<span class="badge pull-right"><t t-esc="country_id_count"/></span>
|
||||
</a>
|
||||
</li>
|
||||
<li t-if="not country_id" t-att-class="searches.get('country') == 'online' and 'active' or ''">
|
||||
<a t-attf-href="/event/?{{ keep_query('type', 'date', country='online') }}">
|
||||
<span>Online Events</span>
|
||||
<span class="badge pull-right"><t t-esc="country_id_count"/></span>
|
||||
</a>
|
||||
</li>
|
||||
|
|
Loading…
Reference in New Issue