[FIX] website_event: categories display
Indeed the type field has been renamed to event_type_id. However some code was still relying on the type and type_count names, instead of event_type_id and event_type_id_count.
This commit is contained in:
@@ -101,8 +101,8 @@ class website_event(http.Controller):
|
||||
type_count = event_obj.search(request.cr, request.uid, domain,
|
||||
count=True, context=request.context)
|
||||
types.insert(0, {
|
||||
'type_count': type_count,
|
||||
'type': ("all", _("All Categories"))
|
||||
'event_type_id_count': type_count,
|
||||
'event_type_id': ("all", _("All Categories"))
|
||||
})
|
||||
|
||||
domain = dom_without('country')
|
||||
|
||||
@@ -165,10 +165,10 @@
|
||||
<xpath expr="//div[@id='left_column']" position="inside">
|
||||
<ul class="nav nav-pills nav-stacked mt32">
|
||||
<t t-foreach="types" t-as="type">
|
||||
<li t-if="type['type']"
|
||||
t-att-class="searches.get('type') == str(type['type'] and type['type'][0]) and 'active' or ''">
|
||||
<a t-attf-href="/event?{{ keep_query('country', 'date', type=type['type'][0]) }}"><t t-esc="type['type'][1]"/>
|
||||
<span class="badge pull-right"><t t-esc="type['type_count']"/></span>
|
||||
<li t-if="type['event_type_id']"
|
||||
t-att-class="searches.get('type') == str(type['event_type_id'] and type['event_type_id'][0]) and 'active' or ''">
|
||||
<a t-attf-href="/event?{{ keep_query('country', 'date', type=type['event_type_id'][0]) }}"><t t-esc="type['event_type_id'][1]"/>
|
||||
<span class="badge pull-right"><t t-esc="type['event_type_id_count']"/></span>
|
||||
</a>
|
||||
</li>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user