diff options
Diffstat (limited to 'addons/mail/static/src/xml/mail.xml')
| -rw-r--r-- | addons/mail/static/src/xml/mail.xml | 143 |
1 files changed, 86 insertions, 57 deletions
diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index e3586e723e4..07c9b406cdc 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -47,11 +47,11 @@ Template used to display the communication history in documents form view. --> - <div t-name="mail.record_thread"> + <div t-name="mail.record_thread" class="oe_mail_record_wall"> <!-- <h4>History and Comments</h4> --> - <div class="oe_mail_recthread_main"> + <ul class="oe_mail_wall_threads"> <!-- contains the document thread --> - </div> + </ul> </div> <!-- @@ -62,12 +62,12 @@ for main thread composition form in document form view. --> <t t-name="mail.compose_message"> - <div> + <div class="oe_mail_compose_textarea"> <img class="oe_mail_icon oe_mail_frame oe_left" alt="User img"/> <div class="oe_mail_msg_content"> <!-- contains the composition form --> <!-- default content: old basic textarea --> - <textarea class="oe_mail_compose_textarea" placeholder="Add your comment here..." onfocus="this.value = '';"/> + <textarea placeholder="Add your comment here..."/> </div> <div class="oe_clear"/> </div> @@ -93,72 +93,90 @@ container, holding the composition form. Then come the various messages. Then comes the 'more' button. --> - <ul t-name="mail.thread" class="oe_mail oe_mail_thread oe_semantic_html_override"> + <div t-name="mail.thread" class="oe_mail oe_mail_thread oe_semantic_html_override"> <div class="oe_mail_thread_action"> <!-- contains the composition box (form + image) --> <t t-call="mail.compose_message"/> </div> - <div class="oe_mail_thread_display"> + <ul class="oe_mail_thread_display"> <!-- contains the threads --> - </div> - <div class="oe_mail_thread_more"> - <button class="oe_mail_button_more" type="button">Load more messages</button> - </div> - </ul> + </ul> + </div> <!-- default layout --> - <li t-name="mail.thread.message" class="oe_mail oe_mail_thread_msg"> - <div t-attf-class="oe_mail_msg_#{record.type} oe_semantic_html_override"> - <img class="oe_mail_icon oe_mail_frame oe_left" t-att-src="record.avatar"/> + <li t-name="mail.thread.message" t-attf-class="oe_mail oe_mail_thread_msg #{widget.unread?'oe_mail_unread':'oe_mail_read'}" t-attf-data-msg_id="{widget.id}"> + <div t-attf-class="oe_mail_msg_#{widget.type} oe_semantic_html_override"> + <!-- message actions (read/unread, reply, delete...) --> + <ul class="oe_header"> + <li class="placeholder-mail-vote"><t t-call="mail.thread.message.vote"/></li> + <li t-if="!widget.options.thread.display_on_flat and widget.unread" title="Read"><a class="oe_read oe_e">W</a></li> + <li t-if="!widget.options.thread.display_on_flat and !widget.unread" title="Set back to unread"><a class="oe_unread oe_e">h</a></li> + <li t-if="!widget.options.message.show_reply_by_email" title="Reply"><a class="oe_reply oe_e">)</a></li> + <li t-if="widget.options.message.show_reply_by_email"><a class="oe_reply_by_email oe_e" title="Reply by mail">)</a></li> + <t t-if="(widget.options.message.show_reply || widget.options.message.show_reply_by_email || (widget.is_author and widget.options.message.show_dd_delete) || widget.type == 'email')"> + <li> + <span class="oe_dropdown_toggle"> + <a class="oe_e" title="More options">í</a> + <ul class="oe_dropdown_menu"> + <li t-if="widget.is_author and widget.options.message.show_dd_delete"><a class="oe_mail_msg_delete">Delete</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='{widget.subtype}'>Hide '<t t-esc="widget.subtype"/>' for this document</a> + </li> --> + <li t-if="widget.options.message.show_reply" title="Reply"><a class="oe_reply oe_full_reply">Full reply</a></li> + <li t-if="widget.options.message.show_reply_by_email"><a class="oe_reply_by_email oe_full_reply" title="Reply by mail">Full reply</a></li> + <li t-if="widget.type == 'email'"><a class="oe_mail_msg_details" t-attf-href="#model=mail.message&id=#{widget.id}" >Details</a></li> + </ul> + </span> + </li> + </t> + </ul> + + <a t-attf-href="#model=res.partner&id=#{widget.author_id[0]}" t-att-title="widget.author_id[1]"> + <img class="oe_mail_icon oe_mail_frame oe_left" t-att-src="widget.avatar"/> + </a> + <div class="oe_mail_msg_content"> - <!-- dropdown menu with message options and actions --> - <span class="oe_dropdown_toggle oe_dropdown_arrow"> - <ul class="oe_dropdown_menu"> - <li t-if="record.is_author and 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 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 --> <div class="oe_mail_msg"> - <h1 t-if="record.subject" class="oe_mail_msg_title"> - <t t-raw="record.subject"/> + <h1 t-if="widget.subject" class="oe_mail_msg_title"> + <t t-raw="widget.subject"/> </h1> - <div class="oe_mail_msg_body"> - <t t-if="options.show_record_name and record.record_name and (!record.subject) and (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="options.show_record_name and record.record_name and record.subject and 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> - <t t-call="mail.thread.message.vote"/> - <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> - <li t-if="record.attachment_ids.length > 0"> + <li t-if="widget.author_id"><a t-attf-href="#model=res.partner&id=#{widget.author_id[0]}"><t t-raw="widget.author_id[1]"/></a></li> + <li><span t-att-title="widget.date"><t t-raw="widget.timerelative"/></span></li> + + <li t-if="widget.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> + <t t-if="widget.attachment_ids.length == 1">1 Attachment</t> + <t t-if="widget.attachment_ids.length > 1"><t t-raw="widget.attachment_ids.length"/> Attachments</t> </a> </li> </ul> - <t t-if="record.attachment_ids.length > 0"> + <div class="oe_clear"/> + <div class="oe_mail_msg_body"> + <t t-if="widget.options.message.show_record_name and widget.record_name and (!widget.subject) and widget.options.thread._parents.length<=widget.options.thread.thread_level and widget.model!='res.partner'"> + <a class="oe_mail_action_model" t-attf-href="#model=#{widget.model}&id=#{widget.res_id}"><t t-raw="widget.record_name"/></a> + </t> + <t t-raw="widget.body"/> + </div> + <t t-if="widget.attachment_ids.length > 0"> <div class="oe_clear"></div> <t t-call="mail.thread.message.attachments"/> </t> </div> </div> </div> + <div class="oe_thread_placeholder"></div> + </li> + + <!-- expandable message layout --> + <li t-name="mail.thread.expandable" t-attf-class="oe_mail oe_mail_thread_msg oe_mail_unread" t-attf-data-thread_id="{widget.id}"> + <div t-attf-class="oe_mail_msg_#{widget.type} oe_semantic_html_override"> + <div class="oe_mail_msg_content oe_mail_msg_more_message"> + <a class="oe_mail_fetch_more">Load more messages <span t-if="widget.nb_messages>0">(<t t-raw="widget.nb_messages"/> messages not display)</span>...</a> + </div> + </div> </li> <!-- @@ -181,14 +199,25 @@ <!-- mail.thread.message.vote Template used to display Like/Unlike in a mail.message --> - <li t-name="mail.thread.message.vote"> - <t t-if='record.vote_user_ids.length > 0'> - <span class="oe_left oe_mail_vote_count"><t t-esc="record.vote_user_ids.length"/> votes</span> - </t> - <button t-attf-class="oe_mail_msg_vote oe_mail_msg_vote_#{record.has_voted}" t-attf-data-msg_id="{record.id}"> - <t t-if="! record.has_voted"><span>+1</span></t> - <t t-if="record.has_voted"><span>-1</span></t> + <span t-name="mail.thread.message.vote"> + <span class="oe_left oe_mail_vote_count"> + <t t-if='widget.has_voted'> + You + </t> + <t t-if='(widget.vote_user_ids.length-(widget.has_voted?1:0)) > 0'> + <t t-if='widget.has_voted'> and </t> + <t t-esc="widget.vote_user_ids.length"/> people + </t> + <t t-if='widget.vote_user_ids.length > 0'> + agree + </t> + </span> + <button t-attf-class="oe_mail_msg_vote oe_tag"> + <span> + <t t-if="!widget.has_voted">Agree</t> + <t t-if="widget.has_voted">Unagree</t> + </span> </button> - </li> + </span> </template> |
