[Erp5-report] r21495 - in /erp5/trunk/bt5/erp5_base: SkinTemplateItem/portal_skins/erp5_bas...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jun 11 14:58:18 CEST 2008


Author: yusei
Date: Wed Jun 11 14:58:15 2008
New Revision: 21495

URL: http://svn.erp5.org?rev=21495&view=rev
Log:
2008-06-11 yusei
* Move Event_send and mail templates to erp5_base. Notification tool depends on them.

Added:
    erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_send.xml
    erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_viewHtmlMimeMessage.xml
    erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_viewMimeMessage.xml
Modified:
    erp5/trunk/bt5/erp5_base/bt/change_log
    erp5/trunk/bt5/erp5_base/bt/revision

Added: erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_send.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_send.xml?rev=21495&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_send.xml (added)
+++ erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_send.xml Wed Jun 11 14:58:15 2008
@@ -1,0 +1,275 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+if body is None:\n
+  body = context.getTextContent() #XXX This does not support structured text format.\n
+\n
+# Subject\n
+if subject is None:\n
+  subject = context.getTitle()\n
+\n
+# From\n
+if from_url is None:\n
+  sender = context.getSourceValue()\n
+  if sender.getTitle():\n
+    from_url = \'"%s" <%s>\' % (sender.getTitle(),\n
+                            sender.getDefaultEmailText())\n
+  else:\n
+    from_url = sender.getDefaultEmailText()\n
+\n
+# Return-Path\n
+if reply_url is None:\n
+  reply_url = context.portal_preferences.getPreferredEventSenderEmail()\n
+additional_headers = None\n
+if reply_url:\n
+  additional_headers = {\'Return-Path\':reply_url}\n
+\n
+# To (multiple)\n
+to_url_list = []\n
+if to_url is None:\n
+  for recipient in context.getDestinationValueList():\n
+    email = recipient.getDefaultEmailText()\n
+    if email:\n
+      if recipient.getTitle():\n
+        to_url_list.append(\'"%s" <%s>\' % (recipient.getTitle(), email))\n
+      else:\n
+        to_url_list.append(email)\n
+    else:\n
+      raise ValueError, \'Recipient %s has no defined email\' % recipient\n
+elif same_type(to_url, \'\'):\n
+  to_url_list.append(to_url)\n
+\n
+# Attachments\n
+if attachment_list is None:\n
+  attachment_list = []\n
+document_type_list = context.getPortalDocumentTypeList()\n
+for attachment in context.getAggregateValueList():\n
+  mime_type, content = attachment.getMimeTypeAndContent()\n
+  name = attachment.getReference()\n
+\n
+  attachment_list.append({\'mime_type\':mime_type,\n
+                          \'content\':content,\n
+                          \'name\':name})\n
+\n
+# Build message per destination\n
+mail_message = None\n
+if context.getTextFormat()==\'text/html\':\n
+  mail_template = context.Event_viewHtmlMimeMessage\n
+else:\n
+  mail_template = context.Event_viewMimeMessage\n
+\n
+for to_url in to_url_list:\n
+  multipart = mail_template.as_message(mfrom=from_url,\n
+                                       mto=to_url,\n
+                                       subject=subject,\n
+                                       body=body,\n
+                                       encoding=\'utf-8\')\n
+  for attachment_dict in attachment_list:\n
+    multipart.add_file(data=attachment_dict[\'content\'],\n
+                       content_type=attachment_dict[\'mime_type\'],\n
+                       filename=attachment_dict[\'name\'])\n
+  mail_message = str(multipart)\n
+  context.activate(activity=\'SQLQueue\').sendMailHostMessage(mail_message)\n
+\n
+context.setData(mail_message)\n
+\n
+# Transit event workflow\n
+if context.getTypeInfo() is not None:\n
+  context.plan()\n
+  context.order()\n
+  context.start()\n
+\n
+if download:\n
+  return mail_message\n
+
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>from_url=None, to_url=None, reply_url=None, subject=None, body=None, attachment_format=None, attachment_list=None, download=None, **kw</string> </value>
+        </item>
+        <item>
+            <key> <string>_proxy_roles</string> </key>
+            <value>
+              <tuple>
+                <string>Manager</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>8</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>from_url</string>
+                            <string>to_url</string>
+                            <string>reply_url</string>
+                            <string>subject</string>
+                            <string>body</string>
+                            <string>attachment_format</string>
+                            <string>attachment_list</string>
+                            <string>download</string>
+                            <string>kw</string>
+                            <string>None</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>sender</string>
+                            <string>additional_headers</string>
+                            <string>to_url_list</string>
+                            <string>_getiter_</string>
+                            <string>recipient</string>
+                            <string>email</string>
+                            <string>ValueError</string>
+                            <string>same_type</string>
+                            <string>document_type_list</string>
+                            <string>attachment</string>
+                            <string>mime_type</string>
+                            <string>content</string>
+                            <string>name</string>
+                            <string>mail_message</string>
+                            <string>mail_template</string>
+                            <string>multipart</string>
+                            <string>attachment_dict</string>
+                            <string>_getitem_</string>
+                            <string>str</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <none/>
+                <none/>
+                <none/>
+                <none/>
+                <none/>
+                <none/>
+                <none/>
+                <none/>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Event_send</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_viewHtmlMimeMessage.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_viewHtmlMimeMessage.xml?rev=21495&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_viewHtmlMimeMessage.xml (added)
+++ erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_viewHtmlMimeMessage.xml Wed Jun 11 14:58:15 2008
@@ -1,0 +1,79 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="MailTemplate" module="Products.MailTemplates.MailTemplate"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_text</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+<tal:body xmlns:tal="http://xml.zope.org/namespaces/tal"\n
+          xmlns:metal="http://xml.zope.org/namespaces/metal"\n
+          ><html><body><tal:x replace="structure options/body"/></body></html></tal:body>
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>content_type</string> </key>
+            <value> <string>text/html</string> </value>
+        </item>
+        <item>
+            <key> <string>expand</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Event_viewHtmlMimeMessage</string> </value>
+        </item>
+        <item>
+            <key> <string>mailhost</string> </key>
+            <value> <string>MailHost</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_viewMimeMessage.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_viewMimeMessage.xml?rev=21495&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_viewMimeMessage.xml (added)
+++ erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Event_viewMimeMessage.xml Wed Jun 11 14:58:15 2008
@@ -1,0 +1,79 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="MailTemplate" module="Products.MailTemplates.MailTemplate"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_text</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+<tal:body xmlns:tal="http://xml.zope.org/namespaces/tal"\n
+          xmlns:metal="http://xml.zope.org/namespaces/metal"\n
+          ><tal:x replace="structure options/body"/></tal:body>
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>content_type</string> </key>
+            <value> <string>text/plain</string> </value>
+        </item>
+        <item>
+            <key> <string>expand</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Event_viewMimeMessage</string> </value>
+        </item>
+        <item>
+            <key> <string>mailhost</string> </key>
+            <value> <string>MailHost</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_base/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/bt/change_log?rev=21495&r1=21494&r2=21495&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/bt/change_log (original)
+++ erp5/trunk/bt5/erp5_base/bt/change_log Wed Jun 11 14:58:15 2008
@@ -1,3 +1,6 @@
+2008-06-11 yusei
+* Move Event_send and mail templates to erp5_base. Notification tool depends on them.
+
 2008-06-03 vincentd
 * add security to manager in the assignment_workflow for Close and Open states
 and query_workflow for Cancelled and Answered states

Modified: erp5/trunk/bt5/erp5_base/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/bt/revision?rev=21495&r1=21494&r2=21495&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/bt/revision (original)
+++ erp5/trunk/bt5/erp5_base/bt/revision Wed Jun 11 14:58:15 2008
@@ -1,1 +1,1 @@
-320
+321




More information about the Erp5-report mailing list