summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2020-08-25 08:26:06 +0000
committerThibault Delavallée <tde@odoo.com>2020-08-31 09:15:15 +0000
commitc804e8eceef03841aa7001a0b2cb14c58a5146f6 (patch)
tree93a56b855c1d6ed1a282d64d0f92ddc68896fb66
parent92579eddda3f15eef9d759a910000374a73f4410 (diff)
[FIX] website_event_track_online: update to new agenda specifications
Some new specifications * if a track has no color -> use a light bg instead of color_0 which is a hard gray. This is not really nice when having lots of tracks without color / some tracks with color; * align header badges; Task ID-2325327 PR odoo/odoo#56430 X-original-commit: f9b602a0f7aad9728151a62258fcbad022d70ebe
-rw-r--r--addons/website_event_track/views/event_track_templates_agenda.xml12
1 files changed, 9 insertions, 3 deletions
diff --git a/addons/website_event_track/views/event_track_templates_agenda.xml b/addons/website_event_track/views/event_track_templates_agenda.xml
index 1608924587c..24a09b6874e 100644
--- a/addons/website_event_track/views/event_track_templates_agenda.xml
+++ b/addons/website_event_track/views/event_track_templates_agenda.xml
@@ -115,16 +115,22 @@
<t t-set="tracks" t-value="time_slots[day][time_slot].get(location, {})"/>
<t t-if="tracks">
<t t-foreach="tracks" t-as="track">
+ <t t-set="_classes"
+ t-value="'text-center %s %s %s' % (
+ 'event_color_%s' % (track.color) if track.color else 'bg-100',
+ 'event_track' if track else '',
+ 'o_location_size_%d' % len(locations),
+ )"/>
<t t-if="track.location_id and track.location_id == location">
<td t-att-rowspan="tracks[track]['rowspan']"
- t-attf-class="text-center event_color_#{track.color} #{track and 'event_track' or ''} o_location_size_#{len(locations)}">
+ t-att-class="_classes">
<t t-call="website_event_track.agenda_main_track"/>
</td>
</t>
<t t-else="">
<td t-att-colspan="len(locations)-1"
t-att-rowspan="tracks[track]['rowspan']"
- t-attf-class="text-center event_color_#{track.color} #{track and 'event_track' or ''} o_location_size_#{len(locations)}">
+ t-att-class="_classes">
<t t-call="website_event_track.agenda_main_track"/>
</td>
</t>
@@ -149,7 +155,7 @@
<template id="agenda_main_track" name="Track Agenda: Track">
<div class="d-flex flex-column h-100">
- <div class="d-flex justify-content-end flex-wrap-reverse o_weagenda_track_badges">
+ <div class="d-flex justify-content-end flex-wrap-reverse align-items-center o_weagenda_track_badges">
<small t-if="track.is_track_live and not track.is_track_done and track.website_published"
class="mx-1 badge badge-danger">Live
</small>