diff options
Diffstat (limited to 'addons/mail/static/src/xml/mail.xml')
| -rw-r--r-- | addons/mail/static/src/xml/mail.xml | 89 |
1 files changed, 58 insertions, 31 deletions
diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index f6be765c603..4d3b56cf62f 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -39,8 +39,8 @@ wall_thread_container template for the wall Each discussion thread is contained inside this template --> - <t t-name="mail.wall_thread_container"> - </t> + <li t-name="mail.wall_thread_container" class="oe_mail_wall_thread"> + </li> <!-- record_thread main template @@ -74,6 +74,20 @@ </t> <!-- + mail.compose_message.add_attachment template + Small template to be inserted in the composition form to add attachments + --> + <t t-name="mail.compose_message.add_attachment"> + <t t-call="HiddenInputFile"> + <t t-set="fileupload_id" t-value="widget.fileupload_id"/> + <t t-set="fileupload_action">/web/binary/upload_attachment</t> + <input type="hidden" name="model" t-att-value="widget.form_view.model"/> + <input type="hidden" name="id" t-att-value="widget.form_view.datarecord.id || 0"/> + <input type="hidden" name="session_id" t-att-value="widget.session.session_id"/> + </t> + </t> + + <!-- thread template This template holds a thread of comments. It begins with an actions container, holding the composition form. Then come the various @@ -100,16 +114,14 @@ <!-- dropdown menu with message options and actions --> <span class="oe_dropdown_toggle oe_dropdown_arrow"> <ul class="oe_dropdown_menu"> - <t t-if="record.is_author"> - <li t-if="display['show_delete']"><a href="#" class="oe_mail_msg_delete" t-attf-data-id='{record.id}'>Delete</a></li> - </t> - <li t-if="display['show_hide']"><a href="#" class="oe_mail_msg_hide" t-attf-data-id='{record.id}'>Remove notification</a></li> + <li t-if="record.is_author & options.show_dd_delete"><a class="oe_mail_msg_delete" t-attf-data-id='{record.id}'>Delete</a></li> + <li t-if="options.show_dd_hide"><a class="oe_mail_msg_hide" t-attf-data-id='{record.id}'>Remove notification</a></li> <!-- Uncomment when adding subtype hiding <li t-if="display['show_hide']"> <a href="#" class="oe_mail_msg_hide_type" t-attf-data-subtype='{record.subtype}'>Hide '<t t-esc="record.subtype"/>' for this document</a> </li> --> - <li><a href="#" t-attf-data-msg_id="{record.id}" class="oe_mail_msg_reply_by_email">Quote and reply</a></li> - <li t-if="record.type == 'email'"><a t-attf-href="#model=mail.message&id=#{record.id}" class="oe_mail_msg_details">Details</a></li> + <li t-if="options.show_dd_reply_by_email"><a class="oe_mail_msg_reply_by_email" t-attf-data-msg_id="{record.id}">Quote and reply</a></li> + <li t-if="record.type == 'email'"><a class="oe_mail_msg_details" t-attf-href="#model=mail.message&id=#{record.id}" >Details</a></li> </ul> </span> <!-- message itself --> @@ -118,39 +130,54 @@ <t t-raw="record.subject"/> </h1> <div class="oe_mail_msg_body"> - - <div class="oe_mail_msg_record_body"> - <a t-attf-href="#model=#{params.res_model}&id=#{params.res_id}" t-if="(params.thread_level > 0) & (!record.subject)"><t t-raw="record.record_name"/></a> - <t t-raw="record.body"/> - </div> + <t t-if="options.show_record_name & (!record.subject) & (options.thread_level > 0)"> + <a t-attf-href="#model=#{record.model}&id=#{record.res_id}"><t t-raw="record.record_name"/></a> + </t> + <t t-raw="record.body"/> </div> <div class="oe_clear"/> <ul class="oe_mail_msg_footer"> - <li t-if="record.subject & params.thread_level > 0"><a t-attf-href="#model=#{params.res_model}&id=#{params.res_id}"><t t-raw="record.record_name"/></a></li> - <li><a t-attf-href="#model=res.partner&id=#{record.author_id[0]}"><t t-raw="record.author_id[1]"/></a></li> - <li><span t-att-title="record.date"><t t-raw="record.timerelative"/></span></li> - <li t-if="display['show_reply']"><a href="#" class="oe_mail_msg_reply">Reply</a></li> - <!-- uncomment when merging vote - <li><a href="#">Like</a></li> - --> - <li t-if="record.attachment_ids.length > 0"> - <a href="#" class="oe_mail_msg_view_attachments"> - <t t-if="record.attachment_ids.length == 1">1 Attachment</t> - <t t-if="record.attachment_ids.length > 1"><t t-raw="record.attachment_ids.length"/> Attachments</t> - </a> - </li> + <li t-if="options.show_record_name & record.subject & options.thread_level > 0"> + <a t-attf-href="#model=#{record.model}&id=#{record.res_id}"><t t-raw="record.record_name"/></a> + </li> + <li><a t-attf-href="#model=res.partner&id=#{record.author_id[0]}"><t t-raw="record.author_id[1]"/></a></li> + <li><span t-att-title="record.date"><t t-raw="record.timerelative"/></span></li> + <li t-if="options.show_reply"><a class="oe_mail_msg_reply">Reply</a></li> + <li t-if="options.show_reply_by_email"><a class="oe_mail_msg_reply_by_email" t-attf-data-msg_id="{record.id}">Reply</a></li> + <!-- uncomment when merging vote + <li><a href="#">Like</a></li> + --> + <li t-if="record.attachment_ids.length > 0"> + <a class="oe_mail_msg_view_attachments"> + <t t-if="record.attachment_ids.length == 1">1 Attachment</t> + <t t-if="record.attachment_ids.length > 1"><t t-raw="record.attachment_ids.length"/> Attachments</t> + </a> + </li> </ul> <t t-if="record.attachment_ids.length > 0"> <div class="oe_clear"></div> - <ul class="oe_mail_msg_attachments"> - <t t-foreach="record.attachments" t-as="attachment"> - <li> <a t-att-href="attachment.url"><t t-raw="attachment.name"/></a> </li> - </t> - </ul> + <t t-call="mail.thread.message.attachments"/> </t> </div> </div> </div> </li> + <!-- + mail.thread.message.attachments template + Template used to display attachments in a mail.message + --> + <t t-name="mail.thread.message.attachments"> + <ul class="oe_mail_msg_attachments"> + <t t-foreach="record.attachment_ids" t-as="attachment"> + <li> + <a t-att-href="attachment.url"><t t-raw="attachment.name || attachment.filename"/></a> + <t t-if="record.show_attachment_delete"> + <a class="oe_right oe_mail_attachment_delete" title="Delete this attachmentt" t-attf-data-id="{attachment.id}">x</a> + </t> + </li> + </t> + </ul> + </t> + </template> |
