summaryrefslogtreecommitdiff
path: root/addons/calendar/static/src/xml/base_calendar.xml
diff options
context:
space:
mode:
authorBarad Mahendra <mba@openerp.com>2018-03-30 17:38:20 +0530
committerThibault Delavallée <tde@odoo.com>2018-05-31 16:49:56 +0200
commit4a59f93d157638d75647cf26d91a4237e2e7b042 (patch)
tree803fbd36e098e4d724ceedd29d750667eeca4fec /addons/calendar/static/src/xml/base_calendar.xml
parent642970494e6f78741a8e0b792031957e4910e8ba (diff)
[IMP] mail, calendar: add today meetings in systray
Purpose of this commit is to display today meetings in the systray. This will help people in their daily job to have quickly access to their meetings. It is displayed along with activities and reminders to have all current work to do in the same place. Displayed meetings are ongoing or not yet started ones of the current day. All-day meetings of the current day are also shown. Done meetings are not displayed to lessen noise. Clicking on the systray will open the calendar view of meetings in a day mode. This is done by a small modification in the calendar view allowing to choose the display mode from context in addition to the mode attribute of the action definition. This commit is linked to task ID 60593. Closes #24438. Thanks to @ged-odoo for quick reviewing.
Diffstat (limited to 'addons/calendar/static/src/xml/base_calendar.xml')
-rw-r--r--addons/calendar/static/src/xml/base_calendar.xml25
1 files changed, 25 insertions, 0 deletions
diff --git a/addons/calendar/static/src/xml/base_calendar.xml b/addons/calendar/static/src/xml/base_calendar.xml
index ac6bfcd2945..56d10a45afe 100644
--- a/addons/calendar/static/src/xml/base_calendar.xml
+++ b/addons/calendar/static/src/xml/base_calendar.xml
@@ -20,4 +20,29 @@
</t>
</t>
+ <t t-extend="mail.chat.ActivityMenuPreview">
+ <t t-jquery="div.o_channel_title" t-operation="after">
+ <div t-if="activity and activity.type == 'meeting'">
+ <t t-set="is_next_meeting" t-value="true"/>
+ <t t-foreach="activity.meetings" t-as="meeting">
+ <div>
+ <span t-att-class="!meeting.allday and is_next_meeting ? 'o_meeting_filter o_meeting_bold' : 'o_meeting_filter'" t-att-data-res_model="activity.model" t-att-data-res_id="meeting.id" t-att-data-model_name="activity.name" t-att-title="meeting.name">
+ <span t-if="!meeting.allday">
+ <t t-esc="moment(meeting.start).local().format('hh:mm A')"/>
+ </span>
+ <span><t t-esc="meeting.name"/></span>
+ </span>
+ <span t-if="meeting.start" class="pull-right">
+ <t t-if="meeting.allday">All Day</t>
+ <t t-else=''>
+ <t t-set="is_next_meeting" t-value="false"/>
+ <t t-esc="moment(meeting.start).fromNow()"/>
+ </t>
+ </span>
+ </div>
+ </t>
+ </div>
+ </t>
+ </t>
+
</template>