summaryrefslogtreecommitdiff
path: root/addons/mail/static/src
diff options
context:
space:
mode:
authorHiral Bhavsar <hbh@odoo.com>2018-11-16 10:35:06 +0000
committerMartin Geubelle <mge@odoo.com>2019-05-03 10:19:40 +0000
commitfac99a901c1e062ba804b8c541a10e79ab4dae3a (patch)
treec4fc9eff3ace8f8c4097c292003f9727833443e3 /addons/mail/static/src
parent33c0017c0c1316fcd69d7c06b0029abeeb830973 (diff)
[IMP] mail: display activity counter on cells
For a record and an activity type (cell in the activiy view), a counter is now displayed at the bottom right, that shows the number of activities if more than one are scheduled. Task 1894990
Diffstat (limited to 'addons/mail/static/src')
-rw-r--r--addons/mail/static/src/js/views/activity/activity_renderer.js8
-rw-r--r--addons/mail/static/src/scss/activity_view.scss6
2 files changed, 10 insertions, 4 deletions
diff --git a/addons/mail/static/src/js/views/activity/activity_renderer.js b/addons/mail/static/src/js/views/activity/activity_renderer.js
index d743af81bb2..435a00d44c2 100644
--- a/addons/mail/static/src/js/views/activity/activity_renderer.js
+++ b/addons/mail/static/src/js/views/activity/activity_renderer.js
@@ -167,7 +167,13 @@ var ActivityRenderer = AbstractRenderer.extend({
$date.text(moment(date).format('ll'));
}
$td.find('a').html($date);
- });
+ if (activity_group.count > 1) {
+ $td.find('a').append($('<span>', {
+ class: 'badge badge-light badge-pill border-0 ' + activity_group.state,
+ text: activity_group.count,
+ }));
+ }
+ });
}
return $td;
});
diff --git a/addons/mail/static/src/scss/activity_view.scss b/addons/mail/static/src/scss/activity_view.scss
index da9f3f6c9bf..12f3c8af5a9 100644
--- a/addons/mail/static/src/scss/activity_view.scss
+++ b/addons/mail/static/src/scss/activity_view.scss
@@ -41,9 +41,9 @@
}
}
}
- .o_activity_btn > span {
- bottom: 5px;
- position: relative;
+ .o_activity_btn > .badge {
+ @include o-position-absolute($bottom: 0, $right: 0);
+
&.planned {
color: theme-color('success');
}