1 <?xml version="1.0" encoding="UTF-8"?>
5 mail.Widget template used to namespace the css -->
12 mail.compose_message template
13 This template holds the composition form to write a note or send
14 an e-mail. It contains by default a textarea, that will be replaced
15 by another composition form in the main wall composition form, or
16 for main thread composition form in document form view.
18 mail.compose_message.compact template
19 This template holds the composition form to write a message, this box is converted into
20 mail.compose_message when focus on textarea
22 <t t-name="mail.compose_message">
23 <div t-if="widget.show_composer and !widget.options.readonly" t-attf-class="oe_msg oe_msg_composer #{widget.thread_level and widget.options.display_indented_thread > -1 ? 'oe_msg_indented' : ''}">
24 <div class="oe_msg_left">
25 <img class="oe_msg_icon" alt="User img" t-attf-src="#{widget.avatar}"/>
27 <div class="oe_msg_center">
28 <div class="oe_msg_content">
29 <button class="oe_full" title="Open the full mail composer"><span class='oe_e'>&ograve</span></button>
30 <t t-call="mail.thread.list_recipients"/>
31 <textarea class="field_text"></textarea>
33 <div class="oe_msg_footer">
34 <div class="oe_msg_attachment_list"></div>
35 <button class="oe_post">
36 <t t-if="!widget.is_log">Send</t>
37 <t t-if="widget.is_log">Log an internal note</t>
39 <t t-call="mail.compose_message.add_attachment"/>
43 <div t-if="widget.show_compact_message and !widget.show_composer and !widget.options.readonly" t-attf-class="oe_msg oe_msg_composer_compact #{widget.thread_level and widget.options.display_indented_thread > -1 ? 'oe_msg_indented' : ''}">
44 <t t-if="widget.options.view_mailbox">
45 <div class="field_text oe_compact oe_compact_inbox">
46 <t t-if="widget.options.compose_placeholder" t-raw="widget.options.compose_placeholder"/>
47 <t t-if="!widget.options.compose_placeholder and widget.options.view_mailbox">Share with my followers...</t>
50 <t t-if="!widget.options.view_mailbox">
51 <div class="field_text oe_compact oe_compact_record">
52 <a class="oe_compose_post" t-if="widget.options.compose_placeholder"><t t-raw="widget.options.compose_placeholder"/></a>
53 <a class="oe_compose_post" t-if="!widget.options.compose_placeholder and !widget.options.view_mailbox">Send a message</a>
54 <t t-if="widget.options.display_log_button">
55 <span class="oe_grey oe_sep_word">or</span>
56 <a class="oe_compose_log">Log an internal note</a>
61 <span t-if="!(widget.show_compact_message and !widget.show_composer) and !widget.show_composer" class="oe_placeholder_compose"></span>
65 mail.compose_message.add_attachment template
66 Small template to be inserted in the composition for add attachments
68 <t t-name="mail.compose_message.add_attachment">
69 <span class="oe_attachment_file">
71 <!-- uploader of file -->
72 <button class="oe_attach"><span class="oe_e">'</span></button>
73 <span class='oe_attach_label'>Attach a File</span>
74 <t t-call="HiddenInputFile">
75 <t t-set="fileupload_id" t-value="widget.fileupload_id"/>
76 <t t-set="fileupload_action" t-translation="off">/web/binary/upload_attachment</t>
77 <input type="hidden" name="model" value="mail.compose.message"/>
78 <input type="hidden" name="id" value="0"/>
79 <input type="hidden" name="session_id" t-att-value="widget.session.session_id"/>
86 mail.thread.message.attachments template
87 Template used to display attachments in a mail.message
89 <t t-name="mail.thread.message.attachments">
90 <t t-foreach='widget.attachment_ids' t-as='attachment'>
91 <t t-if="attachment.file_type_icon !== 'webimage'">
92 <div t-attf-class="oe_attachment #{attachment.upload ? 'oe_uploading' : ''}">
93 <a t-att-href='attachment.url' target="_blank">
94 <img t-att-src="'/mail/static/src/img/mimetypes/' + attachment.file_type_icon + '.png'"></img>
95 <div class='oe_name'><t t-raw='attachment.name' /></div>
97 <div class='oe_delete oe_e' title="Delete this attachment" t-att-data-id="attachment.id">[</div>
98 <div class='oe_progress_bar'>
103 <t t-if="attachment.file_type_icon === 'webimage'">
104 <div t-attf-class="oe_attachment oe_preview #{attachment.upload ? 'oe_uploading' : ''}">
105 <a t-att-href='attachment.url' target="_blank">
106 <img t-att-src="widget.attachments_resize_image(attachment.id, [100,80])"></img>
107 <div class='oe_name'><t t-raw='attachment.name' /></div>
109 <div class='oe_delete oe_e' title="Delete this attachment" t-att-data-id="attachment.id">[</div>
110 <div class='oe_progress_bar'>
119 template to the recipients list
121 <t t-name="mail.thread.list_recipients">
122 <div class="oe_mail_list_recipients" t-if="!widget.is_log">
124 <t t-if="!widget.is_private">
125 <span class="oe_all_follower">
126 <t t-if="widget.parent_thread.parent_message.record_name">
127 Followers of <t t-raw="'"' + widget.parent_thread.parent_message.record_name + '"'"/>
129 <t t-if="!widget.parent_thread.parent_message.record_name and widget.options.view_inbox">My Followers</t>
130 <t t-if="!widget.parent_thread.parent_message.record_name and !widget.options.view_inbox">Followers of this document</t>
133 <t t-set="inc" t-value="0"/>
134 <t t-foreach="widget.partner_ids" t-as="partner">
135 <t t-if="widget.is_private or (widget.user_pid != partner[0])">
136 <t t-if="!widget.is_private and inc==0"> and </t>
137 <span t-attf-class="oe_partner_follower #{inc>=3?'oe_hidden':''}"><t t-if="inc" t-raw="', '"/>
138 <a t-if="widget.options.show_link" t-attf-href="#model=res.partner&id=#{partner[0]}"><t t-esc="partner[1]"/></a>
139 <t t-if="!widget.options.show_link" t-esc="partner[1]"/>
141 <t t-set="inc" t-value="inc+1"/>
144 <t t-if="widget.partner_ids.length > 3">
145 <span class="oe_more">, <a><t t-esc="widget.partner_ids.length - 3"/> others...</a></span>
146 <a class="oe_more_hidden"><<<</a>
149 <div class="oe_recipients" t-if="!widget.is_log">
150 <t t-foreach='widget.recipients' t-as='recipient'>
151 <label t-attf-title="Add as recipient and follower (reason: #{recipient.reason})">
152 <input type="checkbox" t-att-checked="recipient.checked ? 'checked' : undefined" t-att-data="recipient.full_name"/>
153 <t t-esc="recipient.name"/>
154 <t t-if="recipient.email_address">(<t t-esc="recipient.email_address"/>)</t>
155 <t t-if="!recipient.email_address">(no email address)</t>
159 <div t-if="widget.is_log">
160 <span>Add an internal note that will not be sent to the followers</span>
166 Template used to display the communication history in the wall.
168 <div t-name="mail.wall" class="oe_view_manager oe_mail_wall oe_view_manager_current">
169 <table class="oe_view_manager_header">
176 <tr class="oe_header_row oe_header_row_top">
178 <h2 class="oe_view_title">
179 <span class="oe_view_title_text">
180 <t t-esc="widget.action.name"/>
183 <t t-if="widget.action.params.header_description">
185 <span class="oe_view_subtitle_text">
186 <t t-raw="widget.action.params.header_description"/>
190 <td><div class="oe_view_manager_view_search"/></td>
194 <div class="oe_view_manager_wrapper">
196 <div class="oe_view_manager_body">
197 <div class="oe_searchview_drawer_container"/>
198 <div class="oe_mail-placeholder"></div>
199 <aside class="oe_mail_wall_aside"></aside>
206 Empty template that holds the sidebar of the Wall
208 <t t-name="mail.wall.sidebar">
209 <div class="oe_mail_wall_sidebar"></div>
213 display message on the wall when there are no message
215 <t t-name="mail.wall_no_message">
216 <div class="oe_view_nocontent">No messages.</div>
220 error message for uploading
222 <t t-name="mail.error_upload">Uploading error</t>
223 <t t-name="mail.error_upload_please_wait">Please, wait while the file is uploading.</t>
226 record_thread main template
227 Template used to display the communication history in documents
230 <div t-name="mail.record_thread" class="oe_record_thread">
231 <div class="oe_mail-placeholder">
235 <t t-name="mail.thread">
236 <div t-attf-class="oe_thread #{widget.root?'oe_root_thread':''}"/>
239 <!-- default layout -->
240 <t t-name="mail.thread.message">
241 <div t-attf-class="oe_msg #{widget.thread_level and widget.options.display_indented_thread > -1 ? 'oe_msg_indented' : ''} #{widget.subtype ? '' : 'oe_msg_nobody'} oe_msg_#{widget.type}">
243 <div class='oe_msg_left'>
244 <a t-if="widget.options.show_link" t-attf-href="#model=res.partner&id=#{widget.author_id[0]}" t-att-title="widget.author_id[1]">
245 <img class="oe_msg_icon" t-att-src="widget.avatar"/>
247 <img t-if="!widget.options.show_link" class="oe_msg_icon" t-att-src="widget.avatar"/>
250 <div class="oe_msg_center">
251 <div class='oe_msg_icons' t-if="!widget.options.readonly">
252 <span class='oe_read' t-if="widget.options.show_read"><a title="Done" class="oe_e">W</a></span>
253 <span class='oe_unread' t-if="widget.is_favorite and widget.options.show_unread"><a title="Set back to Todo" class="oe_e">v</a></span>
254 <span class='oe_unread' t-if="!widget.is_favorite and widget.options.show_unread"><a title="Move to Inbox" class="oe_e">v</a></span>
255 <span class='oe_reply' t-if="widget.options.show_reply_button"><a title="Reply" class="oe_e">(</a></span>
256 <span t-attf-class="oe_star #{widget.is_favorite?'oe_starred':''}"><a title="Mark as Todo" class="oe_e">7</a></span>
258 <!-- message itself -->
259 <div class="oe_msg_content">
260 <h1 t-if="(widget.show_record_name or widget.subject) and !widget.thread_level" class="oe_msg_title">
261 <a t-if="widget.options.show_link and widget.show_record_name" class="oe_mail_action_model"
262 t-attf-href="#action=mail.action_mail_redirect&model=#{widget.model}&res_id=#{widget.res_id}">
263 <t t-esc="widget.record_name"/>
265 <span t-if="!widget.options.show_link and widget.show_record_name"><t t-esc="widget.record_name"/></span>
266 <t t-if="widget.show_record_name and widget.subject">: </t>
267 <t t-if="widget.subject" t-esc="widget.subject"/>
269 <div class="oe_msg_body">
270 <t t-if="widget.body_short">
271 <div class="oe_msg_body_short"><t t-raw="widget.body_short"/></div>
272 <div class="oe_msg_body_long" style="display: none;"><t t-raw="widget.body"/><span class="oe_mail_reduce"><a href="#">read less</a></span></div>
274 <t t-if="! widget.body_short">
275 <t t-raw="widget.body"/>
279 <div class="oe_msg_footer">
280 <t t-if="widget.attachment_ids.length > 0">
281 <div class="oe_msg_attachment_list"></div>
283 <a t-if="widget.author_id and widget.options.show_link and widget.author_id[0]" t-attf-href="#model=res.partner&id=#{widget.author_id[0]}" t-att-data-partner="widget.author_id[0]" class="oe_mail_action_author"><t t-esc="widget.author_id[2]"/></a>
284 <span t-if="widget.author_id and (!widget.options.show_link or !widget.author_id[0])"><t t-esc="widget.author_id[2]"/></span>
285 <t t-if="widget.type == 'notification'">
287 <t t-if="widget.partner_ids.length > 0">
288 <span class='oe_subtle'>•</span>
291 <t t-if="widget.type == 'comment' and ! widget.subtype and widget.partner_ids.length == 0">
294 <t t-if="(widget.type == 'comment' or widget.type == 'email') and (widget.subtype or widget.partner_ids.length > 0)">
295 <!-- Remove nobody if user have no rights on partner that will display 'portal to nobody 5 minutes ago' that will confuse to end user, now it display 'portal 5 minutes ago' if no rights.-->
296 <t t-if="widget.partner_ids.length > 0">
300 <t t-if="widget.type == 'notification' or ( (widget.type == 'email' or widget.type == 'comment') and (widget.subtype or widget.partner_ids.length > 0))"
301 t-foreach="widget.partner_ids.slice(0, 3)" t-as="partner">
302 <span t-attf-class="oe_partner_follower">
303 <a t-if="widget.options.show_link" t-attf-href="#model=res.partner&id=#{partner[0]}" t-att-data-partner="partner[0]" class="oe_mail_action_author"><t t-esc="partner[1]"/></a>
304 <t t-if="!widget.options.show_link" t-esc="partner[1]"/>
306 <t t-if="!partner_last">,</t>
308 <t t-if="widget.partner_ids.length > 3">
309 <span t-att-title="widget.extra_partners_str">and <t t-esc="widget.extra_partners_nbr"/> more</span>
311 <t t-if="widget.type == 'notification' and widget.partner_ids.length > 0">
314 <span class='oe_subtle'>•</span>
315 <span t-att-title="widget.date">
316 <t t-if="widget.timerelative" t-esc="widget.timerelative"/>
317 <t t-if="!widget.timerelative" t-raw="widget.display_date"/>
319 <span t-if="!widget.options.readonly" class='oe_subtle'>•</span>
320 <t t-if="!widget.options.readonly" t-call="mail.thread.message.vote"/>
326 <!-- expandable message layout -->
327 <t t-name="mail.thread.expandable">
328 <div t-attf-class="oe_msg oe_msg_#{widget.type} #{widget.max_limit ? 'oe_max_limit' : ''} #{widget.thread_level and widget.options.display_indented_thread > -1 ? 'oe_msg_indented' : ''}">
329 <div class="oe_msg_content oe_msg_more_message">
330 <div class='oe_separator'></div>
331 <a t-if="widget.nb_messages <= 0" class="oe_msg_fetch_more">show more message</a>
332 <a t-if="widget.nb_messages === 1" class="oe_msg_fetch_more">show one more message</a>
333 <a t-if="widget.nb_messages > 1" class="oe_msg_fetch_more">show <t t-esc="widget.nb_messages" /> more messages</a>
338 <!-- mail.thread.message.vote
339 Template used to display Like/Unlike in a mail.message
341 <span t-name="mail.thread.message.vote">
342 <span class="oe_mail_vote_count" t-if='widget.vote_nb > 0'>
343 <t t-esc='widget.vote_nb' />
344 <i class="fa fa-thumbs-o-up"></i>
346 <a href='#' class="oe_msg_vote">
347 <t t-if="!widget.has_voted">like</t>
348 <t t-if="widget.has_voted">unlike</t>