[MERGE] mail.message layout
[odoo/odoo.git] / addons / mail / static / src / xml / mail.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <template>
3
4     <div t-name="mail.Wall" class="oe_mail_wall">
5         <table class="oe_view_manager_header">
6             <tr class="oe_header_row">
7                 <td><h2 class="oe_view_title">All Feeds</h2></td>
8                 <td><div class="oe_view_manager_view_search" t-opentag="true"/></td>
9             </tr>
10         </table>
11         <div class="oe_mail_wall_main">
12             <div class="oe_mail_wall_action">
13                 <img class="oe_mail_msg_image oe_left" alt="User img"/>
14                 <textarea class="oe_mail oe_mail_wall_action_textarea" placeholder="What are you working on?"/>
15                 <button class="oe_right oe_mail_wall_button_comment" type="button">Post comment</button>
16             </div>
17             <div class="oe_clear"></div>
18             <ul class="oe_mail_wall_threads">
19             </ul>
20             <div class="oe_mail_wall_more">
21                 <button class="oe_mail_wall_button_more" type="button">See more discussions</button>
22             </div>
23         </div>
24         <div class="oe_mail_wall_aside"></div>
25     </div>
26
27     <t t-name="mail.WallThreadContainer">
28     </t>
29
30     <div t-name="mail.RecordThread" class="oe_mail_recthread">
31         <div class="oe_mail_recthread_left"></div>
32         <div class="oe_mail_recthread_right">
33             <div class="oe_mail_recthread_actions">
34                 <button type="button" class="oe_mail_button_follow oe_mail_button_mouseout">Not following</button>
35                 <button type="button" class="oe_mail_button_unfollow oe_mail_button_mouseout">Following</button>
36                 <button type="button" class="oe_mail_button_followers">Display followers</button>
37             </div>
38             <div class="oe_mail_recthread_followers">
39                 <h4>Followers</h4>
40                 <ul class="oe_mail_followers_display"></ul>
41             </div>
42         </div>
43     </div>
44
45     <div t-name="mail.Thread" class="oe_mail oe_mail_thread">
46         <div class="oe_mail_thread_action">
47             <img class="oe_mail_msg_image oe_left" alt="User img"/>
48             <div class="oe_mail_msg_content">
49                 <textarea class="oe_mail oe_mail_action_textarea" placeholder="Add your comment here..." onfocus="this.value = '';"/>
50             </div>
51         </div>
52         <div class="oe_mail_thread_display"></div>
53         <div class="oe_mail_thread_more">
54             <button class="oe_mail_button_more" type="button">Load more messages</button>
55         </div>
56     </div>
57
58     <!-- default layout -->
59     <div t-name="mail.Thread.message" class="oe_mail oe_mail_thread_msg">
60         <div t-attf-class="oe_mail_msg_#{record.type}">
61             <img class="oe_email_icon oe_left" t-att-src="record.mini_url"/>
62             <div class="oe_mail_msg_content">
63                 <span class="oe_dropdown_toggle oe_dropdown_arrow">
64                     <ul class="oe_dropdown_menu">
65                         <t t-if="thread._is_author(record.user_id[0]) &amp;&amp; display['show_delete']">
66                             <li><a href="#" t-attf-data-id='{record.id}' class="oe_mail_msg_delete">Delete</a></li>
67                         </t>
68                         <t t-if="!thread._is_author(record.user_id[0]) &amp;&amp; display['show_hide']">
69                             <li><a href="#" t-attf-data-id='{record.id}' class="oe_mail_msg_hide">Hide</a></li>
70                         </t>
71                     </ul>
72                 </span>
73                 
74                 <div class="oe_mail_msg">
75                      <t t-if="record.subject">
76                         <h1 class="oe_mail_msg_title">
77                             <a href="#" class="oe_mail_internal_link"><t t-raw="record.subject"/></a>
78                         </h1>
79                     </t>
80                     
81                     <p class="oe_mail_msg_subtitle">
82                         <t t-if="params.thread_level > 0">
83                             <a href="#" t-attf-data-res-model='{params.res_model}' t-attf-data-res-id='{params.res_id}' class="oe_mail_internal_link"><t t-raw="record.record_name"/></a>
84                         </t>
85                         <span class="oe_mail_msg_author"><a href="#" data-res-model='res.users' t-attf-data-res-id='{record.user_id[0]}' class="oe_mail_internal_link"><t t-raw="record.user_id[1]"/></a></span>
86                         <span class="oe_mail_msg_date" t-att-title="record.date"><t t-raw="record.timerelative"/></span>
87                     </p>
88
89                     <div class="oe_mail_msg_body"><t t-raw="record.body"/></div>
90                     <t t-if="record.tr_body">
91                         <div class="oe_mail_msg_body_short"><t t-raw="record.tr_body"/></div>
92                     </t>
93
94                     <ul class="oe_mail_msg_footer">
95                       <t t-if="display['show_reply']">
96                         <li><a href="#" class="oe_mail_msg_reply">Reply</a></li>
97                       </t>
98                       <li><a href="#">Like</a></li>
99                       <t t-if="record.attachment_ids.length > 0">
100                         <li>
101                             <a href="#" class="oe_mail_msg_view_attachments">
102                                 <t t-if="record.attachment_ids.length == 1">Attachment</t>
103                                 <t t-if="record.attachment_ids.length > 1">Attachments (<t t-raw="record.attachment_ids.length"/>)</t>
104                             </a>
105                         </li>
106                       </t>
107                     </ul>
108                     <t t-if="record.attachment_ids.length > 0">
109                         <div class="oe_clear"></div>
110                         <ul class="oe_mail_msg_attachments">
111                             <t t-foreach="record.attachments" t-as="attachment">
112                                 <li> <a t-att-href="attachment.url"><t t-raw="attachment.name"/></a> </li>
113                             </t>
114                         </ul>
115                     </t>
116                 </div>
117             </div>
118         </div>
119     </div>
120
121
122 </template>