[IMP] website_event: improve tag visibility on frontend

PURPOSE:

Before this commit when they were a lot of tags they were all
displayed inline being hidden by the card size. This commit
fix this bug and display them nicely row after row.

LINKS

Task-2737156

Pr: odoo/odoo#83082
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This commit is contained in:
Patrick Hoste
2022-02-22 15:19:23 +00:00
parent b74ed97482
commit 6a67eb8ffa
@@ -203,10 +203,10 @@
</time>
<!-- Location -->
<div itemprop="location" t-field="event.address_id" t-options="{'widget': 'contact', 'fields': ['city'], 'no_marker': 'true'}"/>
<div class="mt8 d-flex align-items-center">
<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 mr8 #{'badge-primary' if tag in search_tags else 'badge-light'} #{'o_tag_color_%s' % tag.color if tag.color else ''}">
t-attf-class="badge mr4 #{'badge-primary' if tag in search_tags else 'badge-light'} #{'o_tag_color_%s' % tag.color if tag.color else ''}">
<span t-esc="tag.name"/>
</span>
</t>