summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml
diff options
context:
space:
mode:
authorDavid Monjoie <dmo@odoo.com>2017-06-28 15:14:05 +0200
committerDavid Monjoie <dmo@odoo.com>2017-07-03 08:15:26 +0200
commit537181d4e3baad55db1fb83ea3c9e1ad9104e3fb (patch)
tree85889e9c5c3f3e3fcc087f7cdec8b44019f8b990 /addons/web/static/src/xml
parent405681fa8b0a68108291f1aab19a961c458babfa (diff)
[FIX] web: display indicator when many attendees in calendar event
In saas-15, when an event had more than 3 attendees, it used to show a '+' at the left of the avatars. This behavior was lost in saas-16 where it became 'display 5 avatars max and that's it'. This commit brings back the behavior of saas-15 and improves it such that the '+' sign displays the number of additional attendees whose avatars are not shown and displays it on the right. Example for 7 attendees, '[]' representing an avatar: saas-15: +[][][] saas-16 before: [][][][][] saas-16 now: [][][]+4
Diffstat (limited to 'addons/web/static/src/xml')
-rw-r--r--addons/web/static/src/xml/web_calendar.xml6
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/web/static/src/xml/web_calendar.xml b/addons/web/static/src/xml/web_calendar.xml
index e38d98e46de..430c2d3772c 100644
--- a/addons/web/static/src/xml/web_calendar.xml
+++ b/addons/web/static/src/xml/web_calendar.xml
@@ -20,7 +20,11 @@
<t t-foreach="widget.displayFields" t-as="name">
<div t-attf-class="o_field_#{name} o_field_type_#{fields[name].type}">
<t t-if="widget.displayFields[name].avatar_field">
- <t t-esc="fields[name].string"/>: <t t-foreach="widget.getAvatars(record, name, widget.displayFields[name].avatar_field).slice(0,5)" t-as="image"><t t-raw="image"/></t>
+ <t t-esc="fields[name].string"/>:
+ <div class="o_calendar_avatars pull-right">
+ <t t-foreach="widget.getAvatars(record, name, widget.displayFields[name].avatar_field).slice(0,3)" t-as="image"><t t-raw="image"/></t>
+ <span t-if="record[name].length - 3 > 0">+<t t-esc="record[name].length - 3"/></span>
+ </div>
</t>
<t t-else="">
<t t-esc="format(record, name)"/>