mirror of https://github.com/OCA/social.git
[IMP] Forbid other users from deleting messages, add a delete function.
parent
b361f3248e
commit
24df3cf769
|
@ -7,6 +7,7 @@ openerp.mail_edit = function (instance) {
|
||||||
bind_events: function () {
|
bind_events: function () {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
this.$('.oe_edit').on('click', this.on_message_edit);
|
this.$('.oe_edit').on('click', this.on_message_edit);
|
||||||
|
this.$('.oe_delete').on('click', this.on_message_delete);
|
||||||
},
|
},
|
||||||
|
|
||||||
on_message_edit: function () {
|
on_message_edit: function () {
|
||||||
|
|
|
@ -3,9 +3,14 @@
|
||||||
<template>
|
<template>
|
||||||
<t t-extend="mail.thread.message">
|
<t t-extend="mail.thread.message">
|
||||||
<t t-jquery=".oe_msg_icons .oe_reply" t-operation="before">
|
<t t-jquery=".oe_msg_icons .oe_reply" t-operation="before">
|
||||||
|
<t t-if="widget.is_author">
|
||||||
<span class="oe_edit">
|
<span class="oe_edit">
|
||||||
<a title="Edit Mail" class="oe_e">&</a>
|
<a title="Edit Mail" class="oe_e">&</a>
|
||||||
</span>
|
</span>
|
||||||
|
<span class="oe_delete">
|
||||||
|
<a title="Delete" class="oe_e">[</a>
|
||||||
|
</span>
|
||||||
|
</t>
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue