diff options
| author | ThanhDodeurOdoo <tso@odoo.com> | 2018-05-31 16:04:06 +0200 |
|---|---|---|
| committer | ThanhDodeurOdoo <tso@odoo.com> | 2018-09-13 11:50:26 +0200 |
| commit | 7f97c9fc056a0949c61c8444ee20f4c95bb3e9a9 (patch) | |
| tree | 949a7dcb0553f81139afc5586a551641795788fa /addons/mail/static/src/xml | |
| parent | 6a2b4827d4fb50940ff7ab6a16d25368665f0381 (diff) | |
[IMP] mail: new attachment button in the chatter
- Added a new button to the chatter that displays the amount of
attachments on the current record and when clicked, all the attachments
attached to the current record
- added mail.FormView (includes), used by the chatter attachment
button to fetch the field value of attachment_count.
- added a computed field "attachment_count" to mail.thread that
contains the amount of attachment attached to the record.
- changed the followers div, it is now sharing a "right side"
area with the attachment button.
task: 1860031
Diffstat (limited to 'addons/mail/static/src/xml')
| -rw-r--r-- | addons/mail/static/src/xml/chatter.xml | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/addons/mail/static/src/xml/chatter.xml b/addons/mail/static/src/xml/chatter.xml index f78f60791e0..7881f3fd49c 100644 --- a/addons/mail/static/src/xml/chatter.xml +++ b/addons/mail/static/src/xml/chatter.xml @@ -2,10 +2,33 @@ <templates> <!-- + Chatter attachment tab + --> + + <div t-name="mail.chatter.AttachmentBox" class="o_mail_chatter_attachments"> + <div class="o_chatter_attachment"> + <div class="o_border_dashed"> + <span class="o_attach_title">Attachments</span> + </div> + <div t-if="widget.imageList.length > 0" class="o_attachments_previews"> + <t t-foreach="widget.imageList" t-as="attachment"> + <t t-call="mail.AttachmentPreview"/> + </t> + </div> + <div t-if="widget.otherList.length > 0" class="o_attachments_list"> + <t t-foreach="widget.otherList" t-as="attachment"> + <t t-call="mail.Attachment"/> + </t> + </div> + </div> + </div> + + <!-- Chatter composer @param {mail.composer.Chatter} widget --> + <t t-name="mail.chatter.Composer" t-extend="mail.Composer"> <!-- Insert information before the composer --> <t t-jquery=".o_composer_container" t-operation="before"> @@ -69,6 +92,18 @@ <button t-if="scheduleActivityButton" class="btn btn-link o_chatter_button_schedule_activity" title="Log or schedule an activity" disabled="disabled"> <i class="fa fa-clock-o" role="img" aria-label="Dates" title="Dates"/> <t t-if="isMobile">Activity</t><t t-else="">Schedule activity</t> </button> + + </t> + + <t t-name="mail.chatter.Attachment.Button"> + <button t-attf-class="btn btn-sm btn-link o_chatter_button_attachment #{!count and 'o_hidden' or ''}" title="View all the attachments of the current record"> + <span> + <i class="fa fa-paperclip"/> + <span class="o_chatter_attachment_button_count"> + <t t-esc="' ('+count+')'"/> + </span> + </span> + </button> </t> <!-- @@ -76,7 +111,9 @@ --> <t t-name="mail.Chatter"> <aside class="o_chatter"> - <div class="o_chatter_topbar"/> + <div class="o_chatter_topbar"> + <div class="o_topbar_right_area"/> + </div> </aside> </t> |
