diff options
| author | Purnendu Singh (OpenERP) <psi@tinyerp.com> | 2012-06-22 11:22:30 +0530 |
|---|---|---|
| committer | Purnendu Singh (OpenERP) <psi@tinyerp.com> | 2012-06-22 11:22:30 +0530 |
| commit | 1c35eb1049da4e5c4e4e1e9c50be018405806c08 (patch) | |
| tree | a2230a93b6c7126df352d87bbaff801970dca468 /addons/mail | |
| parent | 4dbe82473921a2335dce292f9b70ef2a8bab3858 (diff) | |
| parent | eea8d596041e8f6ca3fd1d31ef3a5c5d4ae6e91d (diff) | |
[MERGE] Mearge with main addons
bzr revid: psi@tinyerp.com-20120622055230-trqmxu7r1qtxa0ut
Diffstat (limited to 'addons/mail')
| -rw-r--r-- | addons/mail/__openerp__.py | 4 | ||||
| -rw-r--r-- | addons/mail/i18n/fr.po | 105 | ||||
| -rw-r--r-- | addons/mail/i18n/mn.po | 514 | ||||
| -rw-r--r-- | addons/mail/mail_demo.xml | 95 | ||||
| -rw-r--r-- | addons/mail/mail_group_view.xml | 51 | ||||
| -rw-r--r-- | addons/mail/mail_message_view.xml | 4 | ||||
| -rw-r--r-- | addons/mail/mail_thread.py | 25 | ||||
| -rw-r--r-- | addons/mail/report/__init__.py | 1 | ||||
| -rw-r--r-- | addons/mail/report/mail_message_report.py | 66 | ||||
| -rw-r--r-- | addons/mail/report/mail_message_report_view.xml.THIS (renamed from addons/mail/report/mail_message_report_view.xml) | 0 | ||||
| -rw-r--r-- | addons/mail/res_users_view.xml | 2 | ||||
| -rw-r--r-- | addons/mail/security/ir.model.access.csv | 1 | ||||
| -rw-r--r-- | addons/mail/static/src/css/mail.css | 185 | ||||
| -rw-r--r-- | addons/mail/static/src/js/mail.js | 198 | ||||
| -rw-r--r-- | addons/mail/static/src/xml/mail.xml | 145 |
15 files changed, 1053 insertions, 343 deletions
diff --git a/addons/mail/__openerp__.py b/addons/mail/__openerp__.py index 39413a80bed..95ce7d5619d 100644 --- a/addons/mail/__openerp__.py +++ b/addons/mail/__openerp__.py @@ -61,7 +61,6 @@ The main features are: 'mail_thread_view.xml', 'mail_group_view.xml', 'res_partner_view.xml', - 'report/mail_message_report_view.xml', 'security/mail_security.xml', 'security/ir.model.access.csv', 'mail_data.xml', @@ -92,5 +91,8 @@ The main features are: 'qweb': [ 'static/src/xml/mail.xml', ], + 'demo': [ + 'mail_demo.xml', + ], } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mail/i18n/fr.po b/addons/mail/i18n/fr.po index 9062a02c6d4..d732f47eba1 100644 --- a/addons/mail/i18n/fr.po +++ b/addons/mail/i18n/fr.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "POT-Creation-Date: 2012-02-09 00:36+0000\n" -"PO-Revision-Date: 2011-01-18 16:47+0000\n" +"PO-Revision-Date: 2012-06-22 01:42+0000\n" "Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n" "Language-Team: French <fr@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-05-11 05:14+0000\n" -"X-Generator: Launchpad (build 15225)\n" +"X-Launchpad-Export-Date: 2012-06-22 04:47+0000\n" +"X-Generator: Launchpad (build 15461)\n" #. module: mail #: field:mail.compose.message,subtype:0 field:mail.message,subtype:0 @@ -26,7 +26,7 @@ msgstr "" #. module: mail #: help:mail.compose.message,auto_delete:0 msgid "Permanently delete emails after sending" -msgstr "" +msgstr "Supprimer définitivement les courriels après envoi" #. module: mail #: view:mail.message:0 @@ -68,7 +68,7 @@ msgstr "Version plein texte du message" #. module: mail #: view:mail.compose.message:0 msgid "Body" -msgstr "" +msgstr "Corps de texte" #. module: mail #: help:mail.compose.message,email_to:0 help:mail.message,email_to:0 @@ -85,7 +85,7 @@ msgstr "" #. module: mail #: view:mail.message:0 selection:mail.message,state:0 msgid "Received" -msgstr "" +msgstr "Reçu" #. module: mail #: view:mail.message:0 @@ -100,13 +100,13 @@ msgstr "Serveur courriel sortant" #. module: mail #: selection:mail.message,state:0 msgid "Cancelled" -msgstr "" +msgstr "Annulé" #. module: mail #: field:mail.compose.message,reply_to:0 field:mail.message,reply_to:0 #: field:mail.message.common,reply_to:0 msgid "Reply-To" -msgstr "" +msgstr "Répondre à" #. module: mail #: help:mail.compose.message,body_html:0 help:mail.message,body_html:0 @@ -117,7 +117,7 @@ msgstr "Version texte enrichi/HTML du message" #. module: mail #: field:mail.compose.message,auto_delete:0 field:mail.message,auto_delete:0 msgid "Auto Delete" -msgstr "" +msgstr "Suppression automatique" #. module: mail #: help:mail.compose.message,email_bcc:0 help:mail.message,email_bcc:0 @@ -156,27 +156,27 @@ msgstr "Message du courriel" #. module: mail #: view:mail.compose.message:0 msgid "Send" -msgstr "" +msgstr "Envoyé" #. module: mail #: view:mail.message:0 msgid "Failed" -msgstr "" +msgstr "Échec" #. module: mail #: view:mail.message:0 field:mail.message,state:0 msgid "State" -msgstr "" +msgstr "État" #. module: mail #: view:mail.message:0 msgid "Reply" -msgstr "" +msgstr "Répondre" #. module: mail #: view:mail.message:0 selection:mail.message,state:0 msgid "Sent" -msgstr "" +msgstr "Envoyer" #. module: mail #: help:mail.compose.message,subtype:0 help:mail.message,subtype:0 @@ -192,12 +192,12 @@ msgstr "" #. module: mail #: view:mail.message:0 msgid "Recipients" -msgstr "" +msgstr "Destinataires" #. module: mail #: model:ir.model,name:mail.model_mail_compose_message msgid "E-mail composition wizard" -msgstr "" +msgstr "Assistant de composition de courriels" #. module: mail #: field:mail.compose.message,res_id:0 field:mail.message,res_id:0 @@ -208,13 +208,13 @@ msgstr "ID du document associé" #. module: mail #: view:mail.message:0 msgid "Advanced" -msgstr "" +msgstr "Avancée" #. module: mail #: code:addons/mail/wizard/mail_compose_message.py:157 #, python-format msgid "Re:" -msgstr "" +msgstr "Re:" #. module: mail #: field:mail.compose.message,model:0 field:mail.message,model:0 @@ -245,27 +245,27 @@ msgstr "Nom du Partenaire" #. module: mail #: view:mail.message:0 msgid "Retry" -msgstr "" +msgstr "Recommencer" #. module: mail #: view:mail.message:0 selection:mail.message,state:0 msgid "Outgoing" -msgstr "" +msgstr "Sortant" #. module: mail #: view:mail.message:0 msgid "Send Now" -msgstr "" +msgstr "Envoyer maintenant" #. module: mail #: field:mail.message,partner_id:0 msgid "Related partner" -msgstr "" +msgstr "Partenaire associé" #. module: mail #: view:mail.message:0 msgid "User" -msgstr "" +msgstr "Utilisateur" #. module: mail #: field:mail.compose.message,date:0 field:mail.message,date:0 @@ -276,7 +276,7 @@ msgstr "Date" #. module: mail #: view:mail.message:0 msgid "Extended Filters..." -msgstr "" +msgstr "Filtres étendus..." #. module: mail #: code:addons/mail/wizard/mail_compose_message.py:153 @@ -293,7 +293,7 @@ msgstr "" #. module: mail #: field:mail.message,original:0 msgid "Original" -msgstr "" +msgstr "Original" #. module: mail #: code:addons/mail/mail_thread.py:247 view:res.partner:0 @@ -328,7 +328,7 @@ msgstr " sur " #. module: mail #: help:mail.message,auto_delete:0 msgid "Permanently delete this email after sending it, to save space" -msgstr "" +msgstr "Suppression de ce courriel après envoi pour économiser de l'espace" #. module: mail #: field:mail.compose.message,references:0 field:mail.message,references:0 @@ -344,18 +344,18 @@ msgstr "Texte affiché" #. module: mail #: view:mail.compose.message:0 view:mail.message:0 msgid "Cancel" -msgstr "" +msgstr "Annuler" #. module: mail #: view:mail.message:0 msgid "Open" -msgstr "" +msgstr "Ouvrir" #. module: mail #: code:addons/mail/mail_thread.py:434 #, python-format msgid "[OpenERP-Forward-Failed] %s" -msgstr "" +msgstr "[OpenERP-Forward-Echec] %s" #. module: mail #: field:mail.message,user_id:0 @@ -375,7 +375,7 @@ msgstr "" #. module: mail #: view:mail.message:0 msgid "Creation Month" -msgstr "" +msgstr "Mois de création" #. module: mail #: field:mail.compose.message,email_to:0 field:mail.message,email_to:0 @@ -413,7 +413,7 @@ msgstr "Corps (texte)" #: code:addons/mail/wizard/mail_compose_message.py:153 #, python-format msgid "You" -msgstr "" +msgstr "Vous" #. module: mail #: help:mail.compose.message,message_id:0 help:mail.message,message_id:0 @@ -434,6 +434,9 @@ msgid "" " Subject: %s \n" "\t" msgstr "" +"%s à écrit %s: \n" +" Sujet: %s \n" +"\t" #. module: mail #: model:ir.actions.act_window,name:mail.act_res_partner_emails @@ -463,18 +466,20 @@ msgstr "Copie cachée à (BCC)" #. module: mail #: model:ir.model,name:mail.model_mail_message_common msgid "mail.message.common" -msgstr "" +msgstr "mail.message.common" #. module: mail #: help:mail.compose.message,references:0 help:mail.message,references:0 #: help:mail.message.common,references:0 msgid "Message references, such as identifiers of previous messages" msgstr "" +"Références du message , tel que les identifiants des messages précédents" #. module: mail #: constraint:res.partner:0 msgid "Error ! You cannot create recursive associated members." msgstr "" +"Erreur ! Vous ne pouvez pas créer des membres associés de manière récursive." #. module: mail #: help:mail.compose.message,email_cc:0 help:mail.message,email_cc:0 @@ -490,7 +495,7 @@ msgstr "Échec de l'envoi" #. module: mail #: model:ir.model,name:mail.model_mail_message msgid "Email Message" -msgstr "" +msgstr "Contenu du courriel" #. module: mail #: model:ir.model,name:mail.model_mail_thread view:mail.thread:0 @@ -500,13 +505,13 @@ msgstr "Discussion par courriel" #. module: mail #: field:mail.compose.message,filter_id:0 msgid "Filters" -msgstr "" +msgstr "Filtres" #. module: mail #: code:addons/mail/mail_thread.py:220 #, python-format msgid "Mail attachment" -msgstr "" +msgstr "Pièce jointe" #. module: mail #: help:mail.compose.message,reply_to:0 help:mail.message,reply_to:0 @@ -522,3 +527,33 @@ msgstr "Adresse de réponse préférée pour le message" #~ msgid "Rich-text contents" #~ msgstr "Contenu en texte enrichi" + +#~ msgid "Message type" +#~ msgstr "Type de message" + +#~ msgid "Related user" +#~ msgstr "Utilisateur associé" + +#~ msgid "Message headers" +#~ msgstr "En-têtes de message" + +#~ msgid "about a minute ago" +#~ msgstr "il y a une minute" + +#~ msgid "%d minutes ago" +#~ msgstr "il y a %d minutes" + +#~ msgid "a day ago" +#~ msgstr "il y a un jour" + +#~ msgid "%d days ago" +#~ msgstr "il y a %d jours" + +#~ msgid "a month ago" +#~ msgstr "il y a un mois" + +#~ msgid "%d months ago" +#~ msgstr "il y a %d mois" + +#~ msgid "History and Comments" +#~ msgstr "Historique et commentaires" diff --git a/addons/mail/i18n/mn.po b/addons/mail/i18n/mn.po new file mode 100644 index 00000000000..eafd5835b9f --- /dev/null +++ b/addons/mail/i18n/mn.po @@ -0,0 +1,514 @@ +# Mongolian translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR <EMAIL@ADDRESS>, 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" +"POT-Creation-Date: 2012-02-09 00:36+0000\n" +"PO-Revision-Date: 2012-06-19 17:38+0000\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: Mongolian <mn@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2012-06-21 05:25+0000\n" +"X-Generator: Launchpad (build 15435)\n" + +#. module: mail +#: field:mail.compose.message,subtype:0 field:mail.message,subtype:0 +#: field:mail.message.common,subtype:0 +msgid "Message Type" +msgstr "" + +#. module: mail +#: help:mail.compose.message,auto_delete:0 +msgid "Permanently delete emails after sending" +msgstr "" + +#. module: mail +#: view:mail.message:0 +msgid "Open Related Document" +msgstr "" + +#. module: mail +#: view:mail.message:0 +msgid "Open Attachments" +msgstr "" + +#. module: mail +#: view:mail.message:0 +msgid "Message Details" +msgstr "" + +#. module: mail +#: view:mail.thread:0 +msgid "Communication History" +msgstr "" + +#. module: mail +#: view:mail.message:0 +msgid "Group By..." +msgstr "Бүлэглэх..." + +#. module: mail +#: model:ir.actions.act_window,name:mail.action_email_compose_message_wizard +#: view:mail.compose.message:0 +msgid "Compose Email" +msgstr "Имэйл Зохиох" + +#. module: mail +#: help:mail.compose.message,body_text:0 help:mail.message,body_text:0 +#: help:mail.message.common,body_text:0 +msgid "Plain-text version of the message" +msgstr "" + +#. module: mail +#: view:mail.compose.message:0 +msgid "Body" +msgstr "Бие" + +#. module: mail +#: help:mail.compose.message,email_to:0 help:mail.message,email_to:0 +#: help:mail.message.common,email_to:0 +msgid "Message recipients" +msgstr "Зурвас хүлээн авагчид" + +#. module: mail +#: field:mail.compose.message,body_text:0 field:mail.message,body_text:0 +#: field:mail.message.common,body_text:0 +msgid "Text Contents" +msgstr "" + +#. module: mail +#: view:mail.message:0 selection:mail.message,state:0 +msgid "Received" +msgstr "Хүлээн авсан" + +#. module: mail +#: view:mail.message:0 +msgid "Thread" +msgstr "" + +#. module: mail +#: field:mail.message,mail_server_id:0 +msgid "Outgoing mail server" +msgstr "" + +#. module: mail +#: selection:mail.message,state:0 +msgid "Cancelled" +msgstr "Цуцлагдсан" + +#. module: mail +#: field:mail.compose.message,reply_to:0 field:mail.message,reply_to:0 +#: field:mail.message.common,reply_to:0 +msgid "Reply-To" +msgstr "Хэн рүү Хариулах" + +#. module: mail +#: help:mail.compose.message,body_html:0 help:mail.message,body_html:0 +#: help:mail.message.common,body_html:0 +msgid "Rich-text/HTML version of the message" +msgstr "" + +#. module: mail +#: field:mail.compose.message,auto_delete:0 field:mail.message,auto_delete:0 +msgid "Auto Delete" +msgstr "Автоматаар устгах" + +#. module: mail +#: help:mail.compose.message,email_bcc:0 help:mail.message,email_bcc:0 +#: help:mail.message.common,email_bcc:0 +msgid "Blind carbon copy message recipients" +msgstr "" + +#. module: mail +#: model:ir.model,name:mail.model_res_partner view:mail.message:0 +msgid "Partner" +msgstr "Харилцагч" + +#. module: mail +#: field:mail.compose.message,subject:0 field:mail.message,subject:0 +#: field:mail.message.common,subject:0 +msgid "Subject" +msgstr "Гарчиг" + +#. module: mail +#: code:addons/mail/wizard/mail_compose_message.py:152 +#, python-format +msgid "On %(date)s, " +msgstr "%(date)s-нд, " + +#. module: mail +#: field:mail.compose.message,email_from:0 field:mail.message,email_from:0 +#: field:mail.message.common,email_from:0 +msgid "From" +msgstr "Хэнээс" + +#. module: mail +#: view:mail.message:0 +msgid "Email message" +msgstr "Имэйл зурвас" + +#. module: mail +#: view:mail.compose.message:0 +msgid "Send" +msgstr "Илгээх" + +#. module: mail +#: view:mail.message:0 +msgid "Failed" +msgstr "Бүтэлгүйтсэн" + +#. module: mail +#: view:mail.message:0 field:mail.message,state:0 +msgid "State" +msgstr "Төлөв" + +#. module: mail +#: view:mail.message:0 +msgid "Reply" +msgstr "Хариулах" + +#. module: mail +#: view:mail.message:0 selection:mail.message,state:0 +msgid "Sent" +msgstr "Илгээгдсэн" + +#. module: mail +#: help:mail.compose.message,subtype:0 help:mail.message,subtype:0 +#: help:mail.message.common,subtype:0 +msgid "" +"Type of message, usually 'html' or 'plain', used to select plaintext or rich " +"text contents accordingly" +msgstr "" + +#. module: mail +#: view:mail.message:0 +msgid "Recipients" +msgstr "" + +#. module: mail +#: model:ir.model,name:mail.model_mail_compose_message +msgid "E-mail composition wizard" +msgstr "" + +#. module: mail +#: field:mail.compose.message,res_id:0 field:mail.message,res_id:0 +#: field:mail.message.common,res_id:0 +msgid "Related Document ID" +msgstr "" + +#. module: mail +#: view:mail.message:0 +msgid "Advanced" +msgstr "" + +#. module: mail +#: code:addons/mail/wizard/mail_compose_message.py:157 +#, python-format +msgid "Re:" +msgstr "" + +#. module: mail +#: field:mail.compose.message,model:0 field:mail.message,model:0 +#: field:mail.message.common,model:0 +msgid "Related Document Model" +msgstr "" + +#. module: mail +#: view:mail.message:0 +msgid "Month" +msgstr "Сар" + +#. module: mail +#: view:mail.message:0 +msgid "Email Search" +msgstr "" + +#. module: mail +#: help:mail.message,original:0 +msgid "Original version of the message, as it was sent on the network" +msgstr "" + +#. module: mail +#: view:mail.message:0 +msgid "Partner Name" +msgstr "" + +#. module: mail +#: view:mail.message:0 +msgid "Retry" +msgstr "" + +#. module: mail +#: view:mail.message:0 selection:mail.message,state:0 +msgid "Outgoing" +msgstr "" + +#. module: mail +#: view:mail.message:0 +msgid "Send Now" +msgstr "" + +#. module: mail +#: field:mail.message,partner_id:0 +msgid "Related partner" +msgstr "" + +#. module: mail +#: view:mail.message:0 +msgid "User" +msgstr "" + +#. module: mail +#: field:mail.compose.message,date:0 field:mail.message,date:0 +#: field:mail.message.common,date:0 +msgid "Date" +msgstr "" + +#. module: mail +#: view:mail.message:0 +msgid "Extended Filters..." +msgstr "" + +#. module: mail +#: code:addons/mail/wizard/mail_compose_message.py:153 +#, python-format +msgid "%(sender_name)s wrote:" +msgstr "" + +#. module: mail +#: field:mail.compose.message,body_html:0 field:mail.message,body_html:0 +#: field:mail.message.common,body_html:0 +msgid "Rich-text Contents" +msgstr "" + +#. module: mail +#: field:mail.message,original:0 +msgid "Original" +msgstr "" + +#. module: mail +#: code:addons/mail/mail_thread.py:247 view:res.partner:0 +#, python-format +msgid "History" +msgstr "" + +#. module: mail +#: field:mail.compose.message,message_id:0 field:mail.message,message_id:0 +#: field:mail.message.common,message_id:0 +msgid "Message-Id" +msgstr "" + +#. module: mail +#: view:mail.compose.message:0 field:mail.compose.message,attachment_ids:0 +#: view:mail.message:0 field:mail.message,attachment_ids:0 +msgid "Attachments" +msgstr "" + +#. module: mail +#: field:mail.compose.message,email_cc:0 field:mail.message,email_cc:0 +#: field:mail.message.common,email_cc:0 +msgid "Cc" +msgstr "" + +#. module: mail +#: code:addons/mail/mail_message.py:159 +#, python-format +msgid " on " +msgstr "" + +#. module: mail +#: help:mail.message,auto_delete:0 +msgid "Permanently delete this email after sending it, to save space" +msgstr "" + +#. module: mail +#: field:mail.compose.message,references:0 field:mail.message,references:0 +#: field:mail.message.common,references:0 +msgid "References" +msgstr "" + +#. module: mail +#: field:mail.message,display_text:0 +msgid "Display Text" +msgstr "" + +#. module: mail +#: view:mail.compose.message:0 view:mail.message:0 +msgid "Cancel" +msgstr "" + +#. module: mail +#: view:mail.message:0 +msgid "Open" +msgstr "" + +#. module: mail +#: code:addons/mail/mail_thread.py:434 +#, python-format +msgid "[OpenERP-Forward-Failed] %s" +msgstr "" + +#. module: mail +#: field:mail.message,user_id:0 +msgid "Related User" +msgstr "" + +#. module: mail +#: help:mail.compose.message,headers:0 help:mail.message,headers:0 +#: help:mail.message.common,headers:0 +msgid "" +"Full message headers, e.g. SMTP session headers (usually available on " +"inbound messages only)" +msgstr "" + +#. module: mail +#: view:mail.message:0 +msgid "Creation Month" +msgstr "" + +#. module: mail +#: field:mail.compose.message,email_to:0 field:mail.message,email_to:0 +#: field:mail.message.common,email_to:0 +msgid "To" +msgstr "" + +#. module: mail +#: view:mail.message:0 +msgid "Details" +msgstr "" + +#. module: mail +#: model:ir.actions.act_window,name:mail.action_view_mailgate_thread +#: view:mail.thread:0 +msgid "Email Threads" +msgstr "" + +#. module: mail +#: help:mail.compose.message,email_from:0 help:mail.message,email_from:0 +#: help:mail.message.common,email_from:0 +msgid "" +"Message sender, taken from user preferences. If empty, this is not a mail " +"but a message." +msgstr "" + +#. module: mail +#: view:mail.message:0 +msgid "Body (Plain)" +msgstr "" + +#. module: mail +#: code:addons/mail/wizard/mail_compose_message.py:153 +#, python-format +msgid "You" +msgstr "" + +#. module: mail +#: help:mail.compose.message,message_id:0 help:mail.message,message_id:0 +#: help:mail.message.common,message_id:0 +msgid "Message unique identifier" +msgstr "" + +#. module: mail +#: view:mail.message:0 +msgid "Body (Rich)" +msgstr "" + +#. module: mail +#: code:addons/mail/mail_message.py:155 +#, python-format +msgid "" +"%s wrote on %s: \n" +" Subject: %s \n" +"\t" +msgstr "" + +#. module: mail +#: model:ir.actions.act_window,name:mail.act_res_partner_emails +#: view:mail.message:0 field:res.partner,emails:0 +msgid "Emails" +msgstr "" + +#. module: mail +#: model:ir.actions.act_window,name:mail.action_view_mail_message +#: model:ir.ui.menu,name:mail.menu_email_message +#: field:mail.thread,message_ids:0 +msgid "Messages" +msgstr "" + +#. module: mail +#: field:mail.compose.message,headers:0 field:mail.message,headers:0 +#: field:mail.message.common,headers:0 +msgid "Message Headers" +msgstr "" + +#. module: mail +#: field:mail.compose.message,email_bcc:0 field:mail.message,email_bcc:0 +#: field:mail.message.common,email_bcc:0 +msgid "Bcc" +msgstr "" + +#. module: mail +#: model:ir.model,name:mail.model_mail_message_common +msgid "mail.message.common" +msgstr "" + +#. module: mail +#: help:mail.compose.message,references:0 help:mail.message,references:0 +#: help:mail.message.common,references:0 +msgid "Message references, such as identifiers of previous messages" +msgstr "" + +#. module: mail +#: constraint:res.partner:0 +msgid "Error ! You cannot create recursive associated members." +msgstr "" + +#. module: mail +#: help:mail.compose.message,email_cc:0 help:mail.message,email_cc:0 +#: help:mail.message.common,email_cc:0 +msgid "Carbon copy message recipients" +msgstr "" + +#. module: mail +#: selection:mail.message,state:0 +msgid "Delivery Failed" +msgstr "" + +#. module: mail +#: model:ir.model,name:mail.model_mail_message +msgid "Email Message" +msgstr "" + +#. module: mail +#: model:ir.model,name:mail.model_mail_thread view:mail.thread:0 +msgid "Email Thread" +msgstr "" + +#. module: mail +#: field:mail.compose.message,filter_id:0 +msgid "Filters" +msgstr "" + +#. module: mail +#: code:addons/mail/mail_thread.py:220 +#, python-format +msgid "Mail attachment" +msgstr "" + +#. module: mail +#: help:mail.compose.message,reply_to:0 help:mail.message,reply_to:0 +#: help:mail.message.common,reply_to:0 +msgid "Preferred response address for the message" +msgstr "" + +#~ msgid "Message type" +#~ msgstr "Зурвасын төрөл" + +#~ msgid "Text contents" +#~ msgstr "Текстийн агуулга" diff --git a/addons/mail/mail_demo.xml b/addons/mail/mail_demo.xml new file mode 100644 index 00000000000..1adec42a910 --- /dev/null +++ b/addons/mail/mail_demo.xml @@ -0,0 +1,95 @@ +<?xml version="1.0"?> +<openerp> + <data> + + <record id="message_blogpost0_attachment0" model="ir.attachment"> + <field name="name">A cool attachment</field> + <field name="datas">PT1Tb21lIGNvb2wgYXR0YWNobWVudD09ClByYWVzZW50IHZlbCBtYXNzYSBzZWQgbWFzc2EgY29uc2VxdWF0IGVnZXN0YXMgaW4gdHJpc3RpcXVlIG9yY2ku</field> + <field name="datas_fname">a_cool_attachment</field> + <field name="description"></field> + <field name="res_name">Mail group</field> + <field name="res_model">mail.group</field> + <field name="res_id" ref="group_all_company"/> + <field name="type">binary</field> + </record> + + <record id="message_blogpost0_attachment1" model="ir.attachment"> + <field name="name">Another clean attachment</field> + <field name="datas">PT1Tb21lIGNsZWFuIGF0dGFjaG1lbnQ9PQpOdWxsYSB0dXJwaXMgbGVvLCByaG9uY3VzIHV0IGVnZXN0YXMgc2l0IGFtZXQsIGNvbnNlY3RldHVyIHZpdGFlIHVybmEu</field> + <field name="datas_fname">a_clean_attachment</field> + <field name="description"></field> + <field name="res_name">Mail group</field> + <field name="res_model">mail.group</field> + <field name="res_id" ref="group_all_company"/> + <field name="type">binary</field> + </record> + + <record id="message_blogpost0" model="mail.message"> + <field name="subject">Internal company announce</field> + <field name="model">mail.group</field> + <field name="res_id" ref="group_all_company"/> + <field name="subtype">html</field> + <field name="body_html"><![CDATA[Lorem ipsum dolor <b>sit amet</b>, consectetur <em>adipiscing elit</em>. Pellentesque et quam sapien, in sagittis tellus. + Praesent vel massa sed massa consequat egestas in tristique orci. Praesent iaculis libero et neque vehicula iaculis. Vivamus placerat tincidunt orci ac ornare. Proin ut dolor fringilla velit ultricies consequat. Maecenas sit amet ipsum non leo interdum imperdiet. Donec sapien mi, varius a consequat id, consectetur sit amet nulla. + +Fusce tempus elit volutpat mi auctor adipiscing. Nam congue luctus suscipit. Duis vestibulum dapibus enim vitae dignissim. Sed tellus libero, venenatis ut mollis ut, luctus quis dui. Sed rhoncus pulvinar orci in consectetur. + +Nulla turpis leo, rhoncus ut egestas sit amet, consectetur vitae urna. Mauris in dolor in sapien tempus vehicula.]]></field> + <field name="type">comment</field> + <field name="user_id" ref="base.user_root"/> + <field name="attachment_ids" eval="[(6,0,[ref('message_blogpost0_attachment0'),ref('message_blogpost0_attachment1')])]"/> + </record> + + <record id="message_blogpost0_comment0" model="mail.message"> + <field name="subject">Reply</field> + <field name="model">mail.group</field> + <field name="res_id" ref="group_all_company"/> + <field name="subtype">html</field> + <field name="body_html"><![CDATA[That was such a <b>tremendous</b> blogpost ! (first comment)]]></field> + <field name="parent_id" ref="message_blogpost0"/> + <field name="type">comment</field> + <field name="user_id" ref="base.user_root"/> + </record> + + <record id="message_blogpost0_comment1" model="mail.message"> + <field name="subject">Reply</field> + <field name="model">mail.group</field> + <field name="res_id" ref="group_all_company"/> + <field name="subtype">html</field> + <field name="body_html"><![CDATA[Agreed ! +Would it be 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"/> + </record> + + <record id="message_blogpost0_comment2_attachment0" model="ir.attachment"> + <field name="name">Author's full biography</field> + <field name="datas">PT1BYm91dCB0aGUgYXV0aG9yPT0KSW50ZWdlciBzb2RhbGVzIGRvbG9yIGV1IGVsaXQgZnJpbmdpbGxhIGJsYW5kaXQu</field> + <field name="datas_fname">blogpost_author_biography</field> + <field name="description"></field> + <field name="res_name">Mail group</field> + <field name="res_model">mail.group</field> + <field name="res_id" ref="group_all_company"/> + <field name="type">binary</field> + </record> + + <record id="message_blogpost0_comment2" model="mail.message"> + <field name="subject">Reply</field> + <field name="model">mail.group</field> + <field name="res_id" ref="group_all_company"/> + <field name="subtype">html</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. + +Check the file in attachment for more information ! (third comment)]]></field> + <field name="parent_id" ref="message_blogpost0"/> + <field name="type">comment</field> + <field name="user_id" ref="base.user_root"/> + <field name="attachment_ids" eval="[(4,ref('message_blogpost0_comment2_attachment0'))]"/> + </record> + + </data> +</openerp> diff --git a/addons/mail/mail_group_view.xml b/addons/mail/mail_group_view.xml index 764d25e98d3..5003adedea8 100644 --- a/addons/mail/mail_group_view.xml +++ b/addons/mail/mail_group_view.xml @@ -1,8 +1,8 @@ <?xml version="1.0"?> <openerp> <data> - - <!-- Group Kanban View !--> + + <!-- Group Kanban View !--> <record model="ir.ui.view" id="view_group_kanban"> <field name="name">mail.group.kanban</field> <field name="model">mail.group</field> @@ -50,29 +50,30 @@ <field name="type">form</field> <field name="priority" eval="10"/> <field name="arch" type="xml"> - <form string="Group" version="7.0"> - <sheet> - <group colspan="4" col="8"> - <group colspan="6" col="4"> - <separator string="General Information" colspan="4"/> - <field name="name" colspan="2"/> - <field name="responsible_id" colspan="2"/> - <newline/> - <field name="description" colspan="4"/> - </group> - <group colspan="1" col="2"> - <separator string="Group Image" colspan="2"/> - <field name="photo" widget='image' nolabel="1" on_change="onchange_photo(photo)"/> - </group> - <group colspan="1" col="2"> - <separator string="Privacy Settings" colspan="2"/> - <field name="public" nolabel="1"/> - <label string="This group is visible by non members" colspan="2"/> - </group> - </group> - <field name="message_ids" colspan="4" widget="ThreadView" nolabel="1" - options='{"thread_level": 1}'/> - </sheet> + <form string="Group Form" version="7.0"> + <div style="padding: 8px"> + <div class="oe_right"> + <field name="photo" widget='image' on_change="onchange_photo(photo)"/> + </div> + <div class="oe_title"> + <div class="oe_edit_only"> + <label for="name"/> + </div> + <h1><field name="name"/></h1> + <div class="oe_edit_only"> + <label for="responsible_id"/> + </div> + <field name="responsible_id" class="oe_inline"/> + <div class="oe_edit_only"> + <label for="public"/> + <field name="public" class="oe_inline"/> + </div> + <field name="description" colspan="4" nolabel="1"/> + </div> + </div> + <footer> + <field name="message_ids" colspan="4" widget="ThreadView" options='{"thread_level": 1}'/> + </footer> </form> </field> </record> diff --git a/addons/mail/mail_message_view.xml b/addons/mail/mail_message_view.xml index 68dcd610317..b665ccd95d1 100644 --- a/addons/mail/mail_message_view.xml +++ b/addons/mail/mail_message_view.xml @@ -83,10 +83,10 @@ <field name="arch" type="xml"> <form string="Email message" version="7.0"> <sheet> - <label for="subject" class="oe_form_readonly_hidden"/> + <label for="subject" class="oe_edit_only"/> <h1><field name="subject"/></h1> <label for="user_id"/> - <h2><field name="user_id" class="oe_form_inline" string="User"/> on <field name="date" class="oe_form_inline"/></h2> + <h2><field name="user_id" class="oe_inline" string="User"/> on <field name="date" class="oe_inline"/></h2> <group col="4"> <field name="partner_id" readonly="1" attrs="{'invisible':[('partner_id', '=', False)]}"/> <field name="type"/> diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index b1b6c68e4cc..0f404155f42 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -413,7 +413,30 @@ class mail_thread(osv.osv): """ OpenChatter feature: return thread messages """ msg_ids = self.message_load_ids(cr, uid, ids, limit, offset, domain, ascent, root_ids, context=context) - msgs = self.pool.get('mail.message').read(cr, uid, msg_ids, context=context) + msgs = self.pool.get('mail.message').read(cr, uid, msg_ids, [], context=context) + + """ Retrieve all attachments names """ + map_id_to_name = {} + + for msg in msgs: + for attach_id in msg["attachment_ids"]: + map_id_to_name[attach_id] = '' # use empty string as a placeholder + + ids = map_id_to_name.keys() + names = self.pool.get('ir.attachment').name_get(cr, uid, ids, context=context) + + # convert the list of tuples into a dictionnary + for name in names: + map_id_to_name[name[0]] = name[1] + + # give corresponding ids and names to each message + for msg in msgs: + msg["attachments"] = [] + + for attach_id in msg["attachment_ids"]: + msg["attachments"].append({'id': attach_id, 'name': map_id_to_name[attach_id]}) + + """ Sort and return messages """ msgs = sorted(msgs, key=lambda d: (-d['id'])) return msgs diff --git a/addons/mail/report/__init__.py b/addons/mail/report/__init__.py index 7ec4e7cd2c2..c380a63e8d3 100644 --- a/addons/mail/report/__init__.py +++ b/addons/mail/report/__init__.py @@ -19,7 +19,6 @@ # ############################################################################## -import mail_message_report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mail/report/mail_message_report.py b/addons/mail/report/mail_message_report.py deleted file mode 100644 index 7955ea87909..00000000000 --- a/addons/mail/report/mail_message_report.py +++ /dev/null @@ -1,66 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2009-today OpenERP SA (<http://www.openerp.com>) -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/> -# -############################################################################## - -from osv import fields, osv -import time -import tools - -class mail_message_report(osv.osv): - #CSV:: access_res_log_report all,res.log.report,model_res_log_report,,1,0,0,0 - """ Log Report """ - _name = "mail.message.report" - _auto = False - _description = "Mail Message Report" - _columns = { - 'name': fields.char('Year', size=64, required=False, readonly=True), - 'month':fields.selection([('01', 'January'), ('02', 'February'), \ - ('03', 'March'), ('04', 'April'),\ - ('05', 'May'), ('06', 'June'), \ - ('07', 'July'), ('08', 'August'),\ - ('09', 'September'), ('10', 'October'),\ - ('11', 'November'), ('12', 'December')], 'Month', readonly=True), - 'day': fields.char('Day', size=128, readonly=True), - 'creation_date': fields.date('Creation Date', readonly=True), - 'res_model': fields.char('Object', size=128), - 'nbr': fields.integer('# of Entries', readonly=True) - } - - def init(self, cr): - """ - Log Report - @param cr: the current row, from the database cursor - """ - tools.drop_view_if_exists(cr,'mail_message_report') - cr.execute(""" - CREATE OR REPLACE VIEW mail_message_report AS ( - SELECT - l.id as id, - 1 as nbr, - to_char(l.create_date, 'YYYY') as name, - to_char(l.create_date, 'MM') as month, - to_char(l.create_date, 'YYYY-MM-DD') as day, - to_char(l.create_date, 'YYYY-MM-DD') as creation_date, - l.model as res_model, - date_trunc('day',l.create_date) as create_date - FROM - mail_message l - )""") - diff --git a/addons/mail/report/mail_message_report_view.xml b/addons/mail/report/mail_message_report_view.xml.THIS index 10c60a30cb0..10c60a30cb0 100644 --- a/addons/mail/report/mail_message_report_view.xml +++ b/addons/mail/report/mail_message_report_view.xml.THIS diff --git a/addons/mail/res_users_view.xml b/addons/mail/res_users_view.xml index 7cb98129a3c..428f53d092e 100644 --- a/addons/mail/res_users_view.xml +++ b/addons/mail/res_users_view.xml @@ -27,7 +27,7 @@ <field name="notification_email_pref"/> </field> <xpath expr="/form/sheet" position="after"> - <div class="oe_form_bottom"> + <div class="oe_bottom"> <field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/> </div> </xpath> diff --git a/addons/mail/security/ir.model.access.csv b/addons/mail/security/ir.model.access.csv index 3cfd4e88f3d..011e8b27dc5 100644 --- a/addons/mail/security/ir.model.access.csv +++ b/addons/mail/security/ir.model.access.csv @@ -5,4 +5,3 @@ access_mail_thread,mail.thread,model_mail_thread,base.group_user,1,1,1,0 access_mail_subscription,mail.subscription,model_mail_subscription,,1,1,1,1
access_mail_notification,mail.notification,model_mail_notification,,1,1,1,1
access_mail_group,mail.group,model_mail_group,base.group_user,1,1,1,1
-access_mail_message_report,mail.message.report,model_mail_message_report,,1,0,0,0
diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css index f8975d67b78..2421b28fbcb 100644 --- a/addons/mail/static/src/css/mail.css +++ b/addons/mail/static/src/css/mail.css @@ -9,45 +9,49 @@ background: white; } -.openerp div.oe_mail_wall_act { +.openerp div.oe_mail_wall_action { padding: 8px; background: #eee; border: 1px solid #ccc; } -.openerp div.oe_mail_wall_act:after { +.openerp div.oe_mail_wall_action:after { content: ""; display: block; clear: both; } +.openerp .oe_mail_wall_action textarea { + width: 474px; + height: 60px; + padding: 4px; + margin-bottom: 8px; + float: right; +} + /* 2 columns view */ -.openerp div.oe_mail_wall_left { +.openerp div.oe_mail_wall_main { float: left; width: 560px; margin: 8px; } -.openerp div.oe_mail_wall_right { +.openerp div.oe_mail_wall_aside { margin-left: 565px; margin: 8px; } -.openerp div.oe_mail_wall_threads { +/* Threads */ +.openerp .oe_mail_wall_threads { margin-top: 8px; } - -.openerp textarea.oe_mail_wall_action_textarea { - width: 474px; - height: 60px; +.openerp .oe_mail_wall_threads textarea { + height: 40px; padding: 4px; - margin-bottom: 8px; - float: right; } -.openerp div.oe_mail_wall_threads textarea { - height: 40px; - padding: 4px; +.openerp .oe_mail_wall_thread:first .oe_mail_msg_notification { + border-top: 0; } .openerp div.oe_mail_thread_subthread img { @@ -56,13 +60,10 @@ } .openerp div.oe_mail_msg_content { + position: relative; width: 486px; } -.openerp div.oe_mail_msg_content p { - margin: 4px 0; -} - .openerp div.oe_mail_msg_content li{ float: left; margin-right: 3px; @@ -152,14 +153,14 @@ /* ThreadDisplay */ /* ------------------------------ */ -.openerp div.oe_mail_thread_act { +.openerp div.oe_mail_thread_action { white-space: normal; padding: 8px; background: #eee; - border-top: 1px solid #ccc + border-top: 1px solid #ccc; } -.openerp div.oe_mail_thread_act:after { +.openerp div.oe_mail_thread_action:after { content: ""; display: block; clear: both; @@ -173,7 +174,7 @@ margin-left: 66px; } -.openerp div.oe_mail_thread_subthread li.oe_mail_thread_msg:last-child { +.openerp div.oe_mail_thread_subthread .oe_mail_thread_msg:last-child { margin-bottom: 8px; } @@ -182,25 +183,24 @@ border-bottom: 1px solid #D2D9E7; } -.openerp li.oe_mail_thread_msg:after { +.openerp .oe_mail_thread_msg:after { content: ""; display: block; clear: both; } -.openerp li.oe_mail_thread_msg > div:after { +.openerp .oe_mail_thread_msg > div:after { content: ""; display: block; clear: both; } -.openerp .oe_mail_msg_notification, .openerp .oe_mail_msg_comment, .openerp .oe_mail_msg_email { +.openerp .oe_mail_msg_notification, +.openerp .oe_mail_msg_comment, +.openerp .oe_mail_msg_email { padding: 8px; -} - -.openerp .oe_mail_msg_comment, .openerp .oe_mail_msg_email, .openerp .oe_mail_msg_notification { background: white; - border-top: 1px solid #ccc + border-top: 1px solid #ccc; } .openerp .oe_email_icon { @@ -212,7 +212,9 @@ background: #eee; } -.openerp .oe_mail_msg_notification:after, .openerp .oe_mail_msg_comment:after, .openerp .oe_mail_msg_email:after { +.openerp .oe_mail_msg_notification:after, +.openerp .oe_mail_msg_comment:after, +.openerp .oe_mail_msg_email:after { content: ""; display: block; clear: both; @@ -249,15 +251,6 @@ /* Styling (should be openerp) */ /* ------------------------------ */ -.openerp ul.oe_mail { - padding: 0; - margin: 0; -} - -.openerp li.oe_mail { - list-style-type: none; -} - .openerp input.oe_mail, textarea.oe_mail { width: 432px; padding: 4px; @@ -284,20 +277,118 @@ -box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6); } -.openerp p.oe_mail_msg { +.openerp div.oe_mail_msg { padding: 0; margin: 0 0 4px 0; } -.openerp a.oe_mail_oe_intlink { - color: #8786b7; +.openerp .oe_mail_oe_bold { + font-weight: bold; } -.openerp .oe_mail_oe_bold { +/* ------------------------------ */ +/* Messages layout */ +/* ------------------------------ */ + +.openerp .oe_mail_msg .oe_mail_msg_title { + margin: 0; + font-size: 1.3em; font-weight: bold; } +.openerp .oe_mail_msg .oe_mail_msg_title a:link, +.openerp .oe_mail_msg .oe_mail_msg_title a:visited { + color: #4C4C4C; + text-decoration: none; +} + +.openerp .oe_mail_msg_subtitle { + margin: 0 0 .5em 0; +} +.openerp .oe_mail_msg_footer, +.openerp .oe_mail_msg_subtitle { + color: #888; +} + +.openerp .oe_mail_msg_body { + margin-bottom: .5em; + text-align: justify; +} + +.openerp .oe_mail_msg_tail { + display: none; +} + +/* Read more/less link */ +.openerp .oe_mail_msg_content .expand, +.openerp .oe_mail_msg_content .reduce { + font-weight: bold; +} + +/* Dropdown menu */ +.openerp .oe_mail_msg_content .oe_dropdown_toggle { + position: absolute; + top: 0px; + right: 3px; +} +.openerp .oe_mail_msg_content .oe_dropdown_arrow:after { + border-top: 4px solid transparent; +} +.openerp .oe_mail_msg_content:hover .oe_dropdown_arrow:after { + border-top: 4px solid #404040; +} + +.openerp .oe_mail_msg_footer li:after { + content: " · "; +} + +.openerp .oe_mail_msg_footer li:last-child:after { + content: ""; +} + +/* Attachments list */ +.openerp ul.oe_mail_msg_attachments { + display: none; + width: 100%; + border-top: 1px solid #CCC; + margin: .5em 0 0 0; + padding: .5em 0; + list-style-position: inside; +} +.openerp ul.oe_mail_msg_attachments li { + float: none; + margin: 0; + padding: 0; + list-style-type: square; +} + + +/* ------------------------------ */ +/* Group Form */ +/* ------------------------------ */ + +div.oe_mail_group_advanced_details { + display: none; +} + +.oe_form_sheetbg.openerp_mail_group_sheet { + min-height: 0px; + max-height: none; +} + +.oe_form_sheetbg.openerp_mail_group_sheet .oe_form_sheet { + min-height: 0px; + max-height: none; + padding: 0px 18px; + max-width: 80%; +} + +/* Resize group logo */ +.oe_form_sheetbg.openerp_mail_group_sheet .oe_form_field_image > img { + max-width: 100px; + max-height: 100px; +} -/*.openerp .oe_mail_oe_space:after {*/ - /*content: " · ";*/ - /*margin-right: 2px;*/ -/*}*/ +/* Resize group description */ +.oe_form_sheetbg.openerp_mail_group_sheet .oe_form_field_text > textarea { + height: 40px; +} diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 905e95f3aef..26c83f188ab 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -1,25 +1,25 @@ openerp.mail = function(session) { var _t = session.web._t, _lt = session.web._lt; - + var mail = session.mail = {}; /** - * Add records to sorted_comments array - * @param {Array} records records from mail.message sorted by date desc - * @returns {Object} cs comments_structure: dict - * cs.model_to_root_ids = {model: [root_ids], } - * cs.new_root_ids = [new_root_ids] - * cs.root_ids = [root_ids] - * cs.msgs = {record.id: record,} - * cs.tree_struct = {record.id: { - * 'level': record_level in hierarchy, 0 is root, - * 'msg_nbr': number of childs, - * 'direct_childs': [msg_ids], - * 'all_childs': [msg_ids], - * 'for_thread_msgs': [records], - * 'ancestors': [msg_ids], } } - */ + * Add records to sorted_comments array + * @param {Array} records records from mail.message sorted by date desc + * @returns {Object} cs comments_structure: dict + * cs.model_to_root_ids = {model: [root_ids], } + * cs.new_root_ids = [new_root_ids] + * cs.root_ids = [root_ids] + * cs.msgs = {record.id: record,} + * cs.tree_struct = {record.id: { + * 'level': record_level in hierarchy, 0 is root, + * 'msg_nbr': number of childs, + * 'direct_childs': [msg_ids], + * 'all_childs': [msg_ids], + * 'for_thread_msgs': [records], + * 'ancestors': [msg_ids], } } + */ function tools_sort_comments(cs, records, parent_id) { var cur_iter = 0; var max_iter = 10; var modif = true; while ( modif && (cur_iter++) < max_iter) { @@ -57,10 +57,6 @@ openerp.mail = function(session) { return cs; } - /* Add ThreadDisplay widget to registry */ - session.web.form.widgets.add( 'Thread', 'openerp.mail.Thread'); -// session.web.page.readonly.add( 'Thread', 'openerp.mail.Thread'); - /** * ThreadDisplay widget: this widget handles the display of a thread of * messages. The [thread_level] parameter sets the thread level number: @@ -72,7 +68,7 @@ openerp.mail = function(session) { * either it will fetch [limit] messages related to [res_model]:[res_id]. */ mail.Thread = session.web.Widget.extend({ - template: 'Thread', + template: 'mail.Thread', /** * @param {Object} parent parent @@ -117,15 +113,24 @@ openerp.mail = function(session) { }, start: function() { + var self = this; + this._super.apply(this, arguments); // customize display - if (! this.display.show_post_comment) this.$element.find('div.oe_mail_thread_act').hide(); + if (! this.display.show_post_comment) { + this.$element.find('div.oe_mail_thread_action').hide(); + } // add events this.add_events(); - /* display user, fetch comments */ + + // display user, fetch comments this.display_current_user(); - if (this.params.records) var display_done = this.display_comments_from_parameters(this.params.records); - else var display_done = this.init_comments(); + + if (this.params.records) { + var display_done = this.display_comments_from_parameters(this.params.records); + } else { + var display_done = this.init_comments(); + } return display_done }, @@ -143,7 +148,7 @@ openerp.mail = function(session) { }); // event: click on 'reply' in msg this.$element.find('div.oe_mail_thread_display').delegate('a.oe_mail_msg_reply', 'click', function (event) { - var act_dom = $(this).parents('div.oe_mail_thread_display').find('div.oe_mail_thread_act:first'); + var act_dom = $(this).parents('div.oe_mail_thread_display').find('div.oe_mail_thread_action:first'); act_dom.toggle(); event.preventDefault(); }); @@ -154,9 +159,9 @@ openerp.mail = function(session) { var msg_id = event.srcElement.dataset.id; if (! msg_id) return false; var call_defer = self.ds_msg.unlink([parseInt(msg_id)]); - $(event.srcElement).parents('li.oe_mail_thread_msg').eq(0).hide(); + $(event.srcElement).parents('.oe_mail_thread_msg').eq(0).hide(); if (self.params.thread_level > 0) { - $(event.srcElement).parents('ul.oe_mail_thread').eq(0).hide(); + $(event.srcElement).parents('.oe_mail_thread').eq(0).hide(); } return false; }); @@ -168,14 +173,14 @@ openerp.mail = function(session) { if (! msg_id) return false; //console.log(msg_id); var call_defer = self.ds.call('message_remove_pushed_notifications', [[self.params.res_id], [parseInt(msg_id)], true]); - $(event.srcElement).parents('li.oe_mail_thread_msg').eq(0).hide(); + $(event.srcElement).parents('.oe_mail_thread_msg').eq(0).hide(); if (self.params.thread_level > 0) { - $(event.srcElement).parents('ul.oe_mail_thread').eq(0).hide(); + $(event.srcElement).parents('.oe_mail_thread').eq(0).hide(); } return false; }); // event: click on an internal link - this.$element.find('div.oe_mail_thread_display').delegate('a.intlink', 'click', function (event) { + this.$element.find('div.oe_mail_thread_display').delegate('a.oe_mail_internal_link', 'click', function (event) { // lazy implementation: fetch data and try to redirect if (! event.srcElement.dataset.resModel) return false; else var res_model = event.srcElement.dataset.resModel; @@ -193,6 +198,19 @@ openerp.mail = function(session) { } else self.do_action({ type: 'ir.actions.act_window', res_model: res_model, res_id: parseInt(res_id), views: [[false, 'form']]}); }); + // event: click on 'attachment(s)' in msg + this.$element.delegate('a.oe_mail_msg_view_attachments', 'click', function (event) { + var act_dom = $(this).parent().parent().parent().find('.oe_mail_msg_attachments'); + act_dom.toggle(); + return false; + }); + // see more + this.$element.on('click','a.oe_mail_msg_more', function (event) { + console.log("sadf"); + $(this).siblings('.oe_mail_msg_tail').show(); + $(this).hide(); + return false; + }); }, destroy: function () { @@ -215,10 +233,14 @@ openerp.mail = function(session) { $.when(defer).then(function (records) { if (records.length <= self.params.limit) self.display.show_more = false; else { self.display.show_more = true; records.pop(); } + + //build attachments download urls and compute time-relative from dates + self.display_comments(records); if (self.display.show_more == true) self.$element.find('div.oe_mail_thread_more:last').show(); else self.$element.find('div.oe_mail_thread_more:last').hide(); - }); + }); + return defer; }, @@ -233,13 +255,16 @@ openerp.mail = function(session) { display_comments: function (records) { var self = this; + for (var k in records) { + records[k].timerelative = $.timeago(records[k].date); + if (records[k].attachments) { + for (var l in records[k].attachments) { + var url = self.session.origin + '/web/binary/saveas?session_id=' + self.session.session_id + '&model=ir.attachment&field=datas&filename_field=datas_fname&id='+records[k].attachments[l].id; + records[k].attachments[l].url = url; + } + } + } this.cs = this.sort_comments_tmp(records); - - /* WIP: map matched regexp -> records to browse with name */ - //_(records).each(function (record) { - //self.do_check_internal_links(record.body_text); - //}); - _(records).each(function (record) { var sub_msgs = []; if ((record.parent_id == false || record.parent_id[0] == self.params.parent_id) && self.params.thread_level > 0 ) { @@ -253,7 +278,7 @@ openerp.mail = function(session) { self.display_comment(record); self.thread = new mail.Thread(self, {'res_model': self.params.res_model, 'res_id': self.params.res_id, 'uid': self.params.uid, 'records': sub_msgs, 'thread_level': (self.params.thread_level-1), 'parent_id': record.id}); - self.$element.find('li.oe_mail_thread_msg:last').append('<div class="oe_mail_thread_subthread"/>'); + self.$element.find('.oe_mail_thread_msg:last').append('<div class="oe_mail_thread_subthread"/>'); self.thread.appendTo(self.$element.find('div.oe_mail_thread_subthread:last')); } else if (self.params.thread_level == 0) { @@ -268,26 +293,27 @@ openerp.mail = function(session) { * Display a record */ display_comment: function (record) { - if (record.type == 'email') { record.mini_url = ('/mail/static/src/img/email_icon.png'); } - else { record.mini_url = this.thread_get_avatar('res.users', 'avatar', record.user_id[0]); } + record.body = this.do_text_nl2br(record.body, true); + if (record.type == 'email') { + record.mini_url = ('/mail/static/src/img/email_icon.png'); + } else { + record.mini_url = this.thread_get_avatar('res.users', 'avatar', record.user_id[0]); + } // body text manipulation record.body = this.do_clean_text(record.body); - record.tr_body = this.do_truncate_string(record.body, this.params.msg_more_limit); record.body = this.do_replace_internal_links(record.body); - if (record.tr_body) record.tr_body = this.do_replace_internal_links(record.tr_body); + + // split for see mode + var split = this.do_truncate_string(record.body, this.params.msg_more_limit); + record.body_head = split[0]; + record.body_tail = split[1]; + // format date according to the user timezone record.date = session.web.format_value(record.date, {type:"datetime"}); - // render - $(session.web.qweb.render('ThreadMsg', {'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) { - var node_body = this.$element.find('span.oe_mail_msg_body:last').append(' <a href="#" class="reduce">[ ... Show less]</a>'); - var node_body_short = this.$element.find('span.oe_mail_msg_body_short:last').append(' <a href="#" class="expand">[ ... Show more]</a>'); - node_body.hide(); - node_body.find('a:last').click(function() { node_body.hide(); node_body_short.show(); return false; }); - node_body_short.find('a:last').click(function() { node_body_short.hide(); node_body.show(); return false; }); - } + + + var rendered = session.web.qweb.render('mail.Thread.message', {'record': record, 'thread': this, 'params': this.params, 'display': this.display}); + $( rendered).appendTo(this.$element.children('div.oe_mail_thread_display:first')); }, /** @@ -403,7 +429,7 @@ openerp.mail = function(session) { var regex_res = regex_login.exec(string); while (regex_res != null) { var login = regex_res[2]; - string = string.replace(regex_res[0], regex_res[1] + '<a href="#" class="intlink oe_mail_oe_intlink" data-res-model="res.users" data-res-login = ' + login + '>@' + login + '</a>'); + string = string.replace(regex_res[0], regex_res[1] + '<a href="#" class="oe_mail_internal_link" data-res-model="res.users" data-res-login = ' + login + '>@' + login + '</a>'); regex_res = regex_login.exec(string); } /* special shortcut: :name, try to find an icon if in list */ @@ -422,16 +448,32 @@ openerp.mail = function(session) { return this.session.prefix + '/web/binary/image?session_id=' + this.session.session_id + '&model=' + model + '&field=' + field + '&id=' + (id || ''); }, + /** + * @param {String} string to truncate + * @param {Number} max number of chars to display + * @returns {String} truncated string + */ do_truncate_string: function(string, max_length) { - if (string.length <= (max_length * 1.2)) return false; - else return string.slice(0, max_length); + // multiply by 1.2: prevent truncating an just too little long string + if (string.length <= (max_length * 1.2)) { + return [string, ""]; + } else { + return [string.slice(0, max_length), string.slice(max_length)]; + } }, + /** Removes html tags, except b, em, br */ do_clean_text: function (string) { - var html = $('<div/>').text(string.replace(/\s+/g, ' ')).html().replace(new RegExp('<(/)?(b|em)\\s*>', 'gi'), '<$1$2>'); + var html = $('<div/>').text(string.replace(/\s+/g, ' ')).html().replace(new RegExp('<(/)?(b|em|br|br /)\\s*>', 'gi'), '<$1$2>'); return html; }, + /** Replaces line bracks by html line breaks (br) */ + do_text_nl2br: function (str, is_xhtml) { + var break_tag = (is_xhtml || typeof is_xhtml === 'undefined') ? '<br />' : '<br>'; + return (str + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1'+ break_tag +'$2'); + }, + /** * * var regex_login = new RegExp(/(^|\s)@((\w|@|\.)*)/g); @@ -465,16 +507,11 @@ openerp.mail = function(session) { }, }); + session.web.form.widgets.add( 'Thread', 'openerp.mail.Thread'); - - /* Add ThreadView widget to registry */ - session.web.form.widgets.add( 'ThreadView', 'openerp.mail.RecordThread'); -// session.web.page.readonly.add( 'ThreadView', 'openerp.mail.RecordThread'); - - /* ThreadView widget: thread of comments */ + /** ThreadView widget: thread of comments */ mail.RecordThread = session.web.form.AbstractField.extend({ - // QWeb template to use when rendering the object - template: 'RecordThread', + template: 'mail.RecordThread', init: function() { this._super.apply(this, arguments); @@ -516,7 +553,7 @@ openerp.mail = function(session) { this._super.apply(this, arguments); var self = this; this.reinit(); - if (! this.view.datarecord.id) { this.$element.find('ul.oe_mail_thread').hide(); return; } + if (! this.view.datarecord.id) { this.$element.find('.oe_mail_thread').hide(); return; } // fetch followers var fetch_sub_done = this.fetch_subscribers(); // create and render Thread widget @@ -541,7 +578,7 @@ openerp.mail = function(session) { if (record.id == self.session.uid) { self.is_subscriber = true; } var mini_url = self.thread_get_avatar('res.users', 'avatar', record.id); $('<li><img class="oe_mail_oe_left oe_mail_msg_image" src="' + mini_url + '"/>' + - '<a href="#" class="intlink oe_mail_oe_intlink" data-res-model="res.users" data-res-id="' + record.id + '">' + record.name + '</a></li>').appendTo(user_list); + '<a href="#" class="oe_mail_internal_link" data-res-model="res.users" data-res-id="' + record.id + '">' + record.name + '</a></li>').appendTo(user_list); }); if (self.is_subscriber) { self.$element.find('button.oe_mail_button_follow').hide(); @@ -573,14 +610,11 @@ openerp.mail = function(session) { return this.session.prefix + '/web/binary/image?session_id=' + this.session.session_id + '&model=' + model + '&field=' + field + '&id=' + (id || ''); }, }); - - - /* Add WallView widget to registry */ - session.web.client_actions.add('mail.all_feeds', 'session.mail.WallView'); - - /* WallView widget: a wall of messages */ + session.web.form.widgets.add( 'ThreadView', 'openerp.mail.RecordThread'); + + /** WallView widget: a wall of messages */ mail.WallView = session.web.Widget.extend({ - template: 'Wall', + template: 'mail.Wall', /** * @param {Object} parent parent @@ -630,7 +664,7 @@ openerp.mail = function(session) { add_event_handlers: function () { var self = this; // post a comment - this.$element.find('button.oe_mail_wall_button_comment').click(function () { return self.do_comment(); }); + this.$element.find('.oe_mail_wall_action button').click(function () { return self.do_comment(); }); // display more threads this.$element.find('button.oe_mail_wall_button_more').click(function () { return self.do_more(); }); }, @@ -684,7 +718,7 @@ openerp.mail = function(session) { this.search['context'] = _.extend(this.params.context, this.search_results.context); this.display_show_more = true; this.comments_structure = {'root_ids': [], 'new_root_ids': [], 'msgs': {}, 'tree_struct': {}, 'model_to_root_ids': {}}; - this.$element.find('div.oe_mail_wall_threads').empty(); + this.$element.find('ul.oe_mail_wall_threads').empty(); return this.fetch_comments(this.params.limit, 0); }, @@ -716,14 +750,14 @@ openerp.mail = function(session) { var records = self.comments_structure.tree_struct[root_id]['for_thread_msgs']; var model_name = self.comments_structure.msgs[root_id]['model']; var res_id = self.comments_structure.msgs[root_id]['res_id']; - var render_res = session.web.qweb.render('WallThreadContainer', {}); - $('<div class="oe_mail_wall_thread">').html(render_res).appendTo(self.$element.find('div.oe_mail_wall_threads')); + var render_res = session.web.qweb.render('mail.WallThreadContainer', {}); + $('<li class="oe_mail_wall_thread">').html(render_res).appendTo(self.$element.find('ul.oe_mail_wall_threads')); var thread = new mail.Thread(self, { 'res_model': model_name, 'res_id': res_id, 'uid': self.session.uid, 'records': records, 'parent_id': false, 'thread_level': self.params.thread_level, 'show_hide': true} ); self.thread_list.push(thread); - return thread.appendTo(self.$element.find('div.oe_mail_wall_thread:last')); + return thread.appendTo(self.$element.find('li.oe_mail_wall_thread:last')); }); // update TODO this.comments_structure['root_ids'] = _.union(this.comments_structure['root_ids'], this.comments_structure['new_root_ids']); @@ -770,12 +804,14 @@ openerp.mail = function(session) { /** Action: Posts a comment */ do_comment: function () { - var comment_node = this.$element.find('textarea.oe_mail_wall_action_textarea'); + var comment_node = this.$element.find('.oe_mail_wall_action textarea'); var body_text = comment_node.val(); comment_node.val(''); var call_done = this.ds_users.call('message_append_note', [[this.session.uid], 'Tweet', body_text, false, 'comment', 'html']).then(this.proxy('init_and_fetch_comments')); }, }); + session.web.client_actions.add('mail.all_feeds', 'session.mail.WallView'); + }; // vim:et fdc=0 fdl=0 foldnestmax=3 fdm=syntax: diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index a34e362960b..5ff8a996116 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -1,36 +1,34 @@ <?xml version="1.0" encoding="UTF-8"?> <template> - <div t-name="Wall" class="oe_mail_wall"> + <div t-name="mail.Wall" class="oe_mail_wall"> <table class="oe_view_manager_header"> <tr class="oe_header_row"> <td><h2 class="oe_view_title">All Feeds</h2></td> <td><div class="oe_view_manager_view_search" t-opentag="true"/></td> </tr> </table> - <div class="oe_mail_wall_left"> - <div class="oe_mail_wall_act"> + <div class="oe_mail_wall_main"> + <div class="oe_mail_wall_action"> <img class="oe_mail_msg_image oe_left" alt="User img"/> <textarea class="oe_mail oe_mail_wall_action_textarea" placeholder="What are you working on?"/> <button class="oe_right oe_mail_wall_button_comment" type="button">Post comment</button> </div> <div class="oe_clear"></div> - <div class="oe_mail_wall_threads"> - </div> + <ul class="oe_mail_wall_threads"> + </ul> <div class="oe_mail_wall_more"> <button class="oe_mail_wall_button_more" type="button">See more discussions</button> </div> </div> - <div class="oe_mail_wall_right"></div> + <div class="oe_mail_wall_aside"></div> </div> - <t t-name="WallThreadContainer"> + <t t-name="mail.WallThreadContainer"> </t> - <div t-name="RecordThread" class="oe_mail_recthread"> - <h4>History and Comments</h4> - <div class="oe_mail_recthread_left"> - </div> + <div t-name="mail.RecordThread" class="oe_mail_recthread"> + <div class="oe_mail_recthread_left"></div> <div class="oe_mail_recthread_right"> <div class="oe_mail_recthread_actions"> <button type="button" class="oe_mail_button_follow oe_mail_button_mouseout">Not following</button> @@ -44,8 +42,8 @@ </div> </div> - <ul t-name="Thread" class="oe_mail oe_mail_thread"> - <div class="oe_mail_thread_act"> + <div t-name="mail.Thread" class="oe_mail oe_mail_thread"> + <div class="oe_mail_thread_action"> <img class="oe_mail_msg_image oe_left" alt="User img"/> <div class="oe_mail_msg_content"> <textarea class="oe_mail oe_mail_action_textarea" placeholder="Add your comment here..." onfocus="this.value = '';"/> @@ -55,78 +53,61 @@ <div class="oe_mail_thread_more"> <button class="oe_mail_button_more" type="button">Load more messages</button> </div> - </ul> + </div> - <li t-name="ThreadMsg" t-attf-class="oe_mail oe_mail_thread_msg"> + <!-- default layout --> + <div t-name="mail.Thread.message" 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"/> + <img class="oe_email_icon 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> + <span class="oe_dropdown_toggle oe_dropdown_arrow"> + <ul class="oe_dropdown_menu"> + <t t-if="thread._is_author(record.user_id[0]) && display['show_delete']"> + <li><a href="#" t-attf-data-id='{record.id}' class="oe_mail_msg_delete">Delete</a></li> + </t> + <t t-if="!thread._is_author(record.user_id[0]) && display['show_hide']"> + <li><a href="#" t-attf-data-id='{record.id}' class="oe_mail_msg_hide">Hide</a></li> + </t> + <li t-if="record.type == 'email'"><a href="#" class="oe_mail_msg_details">Details</a></li> + </ul> + </span> + <div class="oe_mail_msg"> + <h1 t-if="record.subject && record.subject != 'Reply'" class="oe_mail_msg_title"> + <t t-raw="record.subject"/> + </h1> + <div t-if="params.thread_level > 0" class="oe_mail_msg_subtitle"> + <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> + </div> + <div class="oe_mail_msg_body"> + <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> + <t t-raw="record.body_head"/> + <t t-if="record.body_tail"><a href="#" class="oe_mail_msg_more">... See more</a> + <span class="oe_mail_msg_tail"><t t-raw="record.body_tail"/></span> + </t> + </div> + <ul class="oe_mail_msg_footer"> + <li><span t-att-title="record.date"><t t-raw="record.timerelative"/></span></li> + <li t-if="display['show_reply']"><a href="#" class="oe_mail_msg_reply">Reply</a></li> + <!-- uncomment when merging vote + <li><a href="#">Like</a></li> + --> + <li t-if="record.attachment_ids.length > 0"> + <a href="#" class="oe_mail_msg_view_attachments"> + <t t-if="record.attachment_ids.length == 1">Attachment</t> + <t t-if="record.attachment_ids.length > 1">Attachments (<t t-raw="record.attachment_ids.length"/>)</t> + </a> + </li> + </ul> + <t t-if="record.attachment_ids.length > 0"> + <div class="oe_clear"></div> + <ul class="oe_mail_msg_attachments"> + <t t-foreach="record.attachments" t-as="attachment"> + <li> <a t-att-href="attachment.url"><t t-raw="attachment.name"/></a> </li> + </t> + </ul> + </t> + </div> </div> - <t t-if="record.type == 'tmp'"><t t-call="ThreadDisplay" /></t> </div> - </li> - - <t t-name="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="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> - + </div> </template> |
