[IMP] better look for mail messages
bzr revid: abo@openerp.com-20120615131026-t6af0vdg49tsqpsk
This commit is contained in:
@@ -34,7 +34,7 @@ Nulla turpis leo, rhoncus ut egestas sit amet, consectetur vitae urna. Mauris in
|
||||
<field name="res_id" ref="group_all_company"></field>
|
||||
<field name="subtype">html</field>
|
||||
<field name="body_html"><![CDATA[Agreed !
|
||||
Is it possible to learn more about the author (second comment) ?]]></field>
|
||||
Is it possible to learn more about the author (second comment) ?]]></field>
|
||||
<field name="parent_id" ref="message_blogpost0"/>
|
||||
<field name="type">comment</field>
|
||||
<field name="user_id" ref="base.user_root"></field>
|
||||
@@ -45,7 +45,10 @@ Nulla turpis leo, rhoncus ut egestas sit amet, consectetur vitae urna. Mauris in
|
||||
<field name="model">mail.group</field>
|
||||
<field name="res_id" ref="group_all_company"></field>
|
||||
<field name="subtype">html</field>
|
||||
<field name="body_html"><![CDATA[Sure: (second comment) ?]]></field>
|
||||
<field name="body_html"><![CDATA[Sure: Curabitur tempor bibendum diam, et euismod ante rutrum vel.
|
||||
|
||||
In quis purus neque. Integer sodales dolor eu elit fringilla blandit. Maecenas lacus nisi, facilisis sit amet viverra eu, tristique vel augue.
|
||||
Donec viverra congue dui eu blandit. In lacinia molestie nulla, ut sagittis risus feugiat eu. (third comment)]]></field>
|
||||
<field name="parent_id" ref="message_blogpost0"/>
|
||||
<field name="type">comment</field>
|
||||
<field name="user_id" ref="base.user_root"></field>
|
||||
|
||||
@@ -279,7 +279,7 @@ openerp.mail = function(session) {
|
||||
record.date = session.web.format_value(record.date, {type:"datetime"});
|
||||
// render
|
||||
// OPTIONS
|
||||
$(session.web.qweb.render('mail.Thread.default', {'record': record, 'thread': this, 'params': this.params, 'display': this.display})
|
||||
$(session.web.qweb.render('mail.Thread.new', {'record': record, 'thread': this, 'params': this.params, 'display': this.display})
|
||||
).appendTo(this.$element.children('div.oe_mail_thread_display:first'));
|
||||
// truncated: hide full-text, show summary, add buttons
|
||||
if (record.tr_body) {
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
<!-- default layout -->
|
||||
<!-- default layout -->
|
||||
|
||||
<li t-name="mail.Thread.default" t-attf-class="oe_mail oe_mail_thread_msg">
|
||||
<div t-attf-class="oe_mail_msg_#{record.type}">
|
||||
@@ -131,18 +131,78 @@
|
||||
</ul>
|
||||
</t>
|
||||
|
||||
<!-- blog layout -->
|
||||
<!-- new layout -->
|
||||
|
||||
<li t-name="mail.Thread.blogs" t-attf-class="oe_mail oe_mail_thread_msg">
|
||||
<li t-name="mail.Thread.new" t-attf-class="oe_mail oe_mail_thread_msg">
|
||||
<div t-attf-class="oe_mail_msg_#{record.type}">
|
||||
<img t-if="record.type == 'email'" class="oe_email_icon oe_left" src="/mail/static/src/img/email_icon.png"/>
|
||||
<img t-if="record.type == 'notification' || record.type == 'comment'" class="oe_mail_msg_image oe_left" t-att-src="record.mini_url"/>
|
||||
<div class="oe_mail_msg_content">
|
||||
<t t-if="record.type == 'email'"><t t-call="EmailDisplay" /></t>
|
||||
<t t-if="record.type == 'notification' || record.type == 'comment'"><t t-call="NoteDisplay" /></t>
|
||||
<t t-if="record.type == 'email'"><t t-call="mail.Thread.new.EmailDisplay" /></t>
|
||||
<t t-if="record.type == 'notification' || record.type == 'comment'"><t t-call="mail.Thread.new.NoteDisplay" /></t>
|
||||
</div>
|
||||
<t t-if="record.type == 'tmp'"><t t-call="ThreadDisplay" /></t>
|
||||
<t t-if="record.type == 'tmp'"><t t-call="mail.Thread.new.ThreadDisplay" /></t>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<t t-name="mail.Thread.new.NoteDisplay">
|
||||
<p class="oe_mail_msg">
|
||||
<t t-if="params.thread_level > 0">
|
||||
<a href="#" class="intlink oe_mail_oe_intlink" t-attf-data-res-model='{params.res_model}' t-attf-data-res-id='{params.res_id}'><t t-raw="record.record_name"/></a>
|
||||
</t>
|
||||
<span class="oe_mail_msg_body"><t t-raw="record.body"/></span>
|
||||
<t t-if="record.tr_body"><span class="oe_mail_msg_body_short"><t t-raw="record.tr_body"/></span></t><br/>
|
||||
<ul>
|
||||
<t t-if="display['show_reply']">
|
||||
<li><a href="#" class="oe_mail_msg_reply oe_mail_oe_intlink">Reply</a><span class="oe_mail_oe_space oe_fade"> · </span></li>
|
||||
</t>
|
||||
<t t-if="display['show_delete']">
|
||||
<t t-if="thread._is_author(record.user_id[0])">
|
||||
<li><a href="#" t-attf-data-id='{record.id}' class="oe_mail_msg_delete oe_mail_oe_intlink">Delete</a><span class="oe_mail_oe_space oe_fade"> · </span></li>
|
||||
</t>
|
||||
</t>
|
||||
<t t-if="display['show_hide']">
|
||||
<t t-if="!(thread._is_author(record.user_id[0]))">
|
||||
<li><a href="#" t-attf-data-id='{record.id}' class="oe_mail_msg_hide oe_mail_oe_intlink">Hide</a><span class="oe_mail_oe_space oe_fade"> · </span></li>
|
||||
</t>
|
||||
</t>
|
||||
<li>
|
||||
<span class="oe_fade"><t t-raw="record.date"/>
|
||||
by <a href="#" class="intlink oe_mail_oe_intlink" data-res-model='res.users' t-attf-data-res-id='{record.user_id[0]}'><t t-raw="record.user_id[1]"/></a>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
</t>
|
||||
|
||||
<t t-name="mail.Thread.new.EmailDisplay">
|
||||
<p class="oe_mail_msg oe_mail_msg_p_email_header">
|
||||
<t t-if="params.thread_level > 0">
|
||||
<a href="#" class="intlink oe_mail_oe_intlink" t-attf-data-res-model='{params.res_model}' t-attf-data-res-id='{params.res_id}'><t t-raw="record.record_name"/></a>
|
||||
</t>
|
||||
</p>
|
||||
<p><span class="oe_mail_oe_bold">From:</span> <t t-esc="record.email_from"/></p>
|
||||
<p><span class="oe_mail_oe_bold">Subject:</span> <t t-esc="record.subject"/></p>
|
||||
<p class="oe_mail_msg">
|
||||
<span class="oe_mail_msg_body"><t t-raw="record.body"/></span>
|
||||
<t t-if="record.tr_body"><span class="oe_mail_msg_body_short"><t t-raw="record.tr_body"/></span></t>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<t t-if="display['show_delete']">
|
||||
<t t-if="thread._is_author(record.user_id[0])">
|
||||
<li><a href="#" t-attf-data-id='{record.id}' class="oe_mail_msg_delete oe_mail_oe_intlink">Delete</a><span class="oe_mail_oe_space oe_fade"> · </span></li>
|
||||
</t>
|
||||
</t>
|
||||
<t t-if="display['show_hide']">
|
||||
<t t-if="!(thread._is_author(record.user_id[0]))">
|
||||
<li><a href="#" t-attf-data-id='{record.id}' class="oe_mail_msg_hide oe_mail_oe_intlink">Hide</a><span class="oe_mail_oe_space oe_fade"> · </span></li>
|
||||
</t>
|
||||
</t>
|
||||
<li>
|
||||
<span class="oe_fade"><t t-raw="record.date"/></span>
|
||||
</li>
|
||||
</ul>
|
||||
</t>
|
||||
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user