Commit 46a119d7 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_corporate_identity: update

parent 5575ab18
import urllib
params = urllib.urlencode({
'portal_skin': 'Book',
'override_document_description': context.REQUEST.get("override_document_description", ""),
'override_document_short_title': context.REQUEST.get("override_document_short_title", ""),
'override_document_title': context.REQUEST.get("override_document_title", ""),
'override_document_version': context.REQUEST.get("override_document_version", ""),
'override_logo_reference': context.REQUEST.get("override_logo_reference", ""),
'override_source_organisation_title': context.REQUEST.get("override_source_organisation_title", ""),
'override_source_person_title': context.REQUEST.get("override_source_person_title", ""),
'override_document_reference': context.REQUEST.get("override_document_reference", ""),
'include_content_table': context.REQUEST.get("include_content_table", 1),
'include_history_table': context.REQUEST.get("include_history_table", 0),
'include_reference_table': context.REQUEST.get("include_reference_table", 0),
'include_linked_content': context.REQUEST.get("include_linked_content", 0),
'include_report_content': context.REQUEST.get("include_report_content", 0),
'display_svg': context.REQUEST.get("display_svg", "png"),
'name': "default_version"
})
return '<iframe width="100%%" height="500" style="background-color:#FFFFFF;box-sizing:border-box;-wekbit-box-sizing:border-box;" src="%s/WebPage_viewAsWeb?%s"></iframe>' % (context.absolute_url(), params)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_encodeBookUrl</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
import urllib
params = urllib.urlencode({
'portal_skin': 'Leaflet',
'override_source_person_title': context.REQUEST.get("override_source_person_title", ""),
'override_source_organisation_title': context.REQUEST.get("override_source_organisation_title", ""),
'override_logo_reference':context.REQUEST.get("override_logo_reference", ""),
'display_side': context.REQUEST.get("display_side", 1),
'override_leaflet_header_title': context.REQUEST.get("override_leaflet_header_title", ""),
'display_svg':context.REQUEST.get("display_svg", "png"),
'name':"default_version"
})
return '<iframe width="100%%" height="500" style="background-color:#FFFFFF;box-sizing:border-box;-wekbit-box-sizing:border-box;" src="%s/WebPage_viewAsWeb?%s"></iframe>' % (context.absolute_url(), params)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_encodeLeafletUrl</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
import urllib
params = urllib.urlencode({
'portal_skin': 'Letter',
'override_source_person_title': context.REQUEST.get("override_source_person_title", ""),
'override_source_organisation_title': context.REQUEST.get("override_source_organisation_title", ""),
'override_destination_person_title': context.REQUEST.get("override_destination_person_title", ""),
'override_destination_organisation_title': context.REQUEST.get("override_destination_organisation_title", ""),
'display_head': context.REQUEST.get("display_head", 1),
'override_date': context.REQUEST.get("override_date", ""),
'display_svg': context.REQUEST.get("display_svg", "png"),
'destination_position_in_letter': context.REQUEST.get("destination_position_in_letter", "right"),
'display_sender_company_above_recipient':context.REQUEST.get("display_sender_company_above_recipient", 0),
'destination_position_padding_left':context.REQUEST.get('destination_position_padding_left', '100px'),
'name':"default_version"
})
return '<iframe width="100%%" height="500" style="background-color:#FFFFFF;box-sizing:border-box;-wekbit-box-sizing:border-box;" src="%s/WebPage_viewAsWeb?%s"></iframe>' % (context.absolute_url(), params)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_encodeLetterUrl</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
import urllib
params = urllib.urlencode({
'portal_skin': 'Release',
'override_source_person_title': context.REQUEST.get("override_source_person_title", ""),
'override_source_organisation_title': context.REQUEST.get("override_source_organisation_title", ""),
'display_svg': context.REQUEST.get("display_svg", "png"),
'display_about': context.REQUEST.get("display_about", 1),
'name': "default_version"
})
return '<iframe width="100%%" height="500" style="background-color:#FFFFFF;box-sizing:border-box;-wekbit-box-sizing:border-box;" src="%s/WebPage_viewAsWeb?%s"></iframe>' % (context.absolute_url(), params)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_encodePressReleaseUrl</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
import urllib
params = urllib.urlencode({
'portal_skin': 'Slide',
'override_source_organisation_title': context.REQUEST.get("override_source_organisation_title", ""),
'override_logo_reference': context.REQUEST.get("override_logo_reference", ""),
'display_svg': context.REQUEST.get("display_svg", "png"),
'display_note': context.REQUEST.get("display_note", 1),
'name': "default_version"
})
return '<iframe width="100%%" height="500" style="background-color:#FFFFFF;box-sizing:border-box;-wekbit-box-sizing:border-box;" src="%s/WebPage_viewAsWeb?%s"></iframe>' % (context.absolute_url(), params)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_encodeSlideShowUrl</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -41,7 +41,7 @@ if source_organisation: ...@@ -41,7 +41,7 @@ if source_organisation:
return source.get("organisation_title", "") return source.get("organisation_title", "")
if source_person: if source_person:
return source.get("name", "") return source.get("contributor_title_string", "")
if logo: if logo:
url = source.get('enhanced_logo_url', '') url = source.get('enhanced_logo_url', '')
......
...@@ -14,4 +14,4 @@ if sender_company: ...@@ -14,4 +14,4 @@ if sender_company:
return source.get("organisation_title", "") return source.get("organisation_title", "")
if sender: if sender:
return source.get("name", "") return source.get("contributor_title_string", "")
...@@ -3,10 +3,13 @@ person = context.REQUEST.get('field_your_override_source_person_title', '') ...@@ -3,10 +3,13 @@ person = context.REQUEST.get('field_your_override_source_person_title', '')
if not person: if not person:
return True return True
if not context.portal_catalog( person = person.split(',')
portal_type=("Person", "Organisation"), for tmp in person:
title= '="%s"' % person, tmp = tmp.strip()
): if not context.portal_catalog(
return False portal_type=("Person", "Organisation"),
title= '="%s"' % tmp
):
return False
return True return True
...@@ -299,11 +299,7 @@ ...@@ -299,11 +299,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string>python: here.Base_encodeBookUrl()</string> </value>
python: \'<iframe width="100%%" height="500" style="background-color:#FFFFFF;box-sizing:border-box;-wekbit-box-sizing:border-box;" src="%s/WebPage_viewAsWeb?portal_skin=Book&amp;override_document_description=%s&amp;override_document_short_title=%s&amp;override_document_title=%s&amp;override_document_version=%s&amp;override_logo_reference=%s&amp;override_source_organisation_title=%s&amp;override_source_person_title=%s&amp;override_document_reference=%s&amp;include_content_table=%s&amp;include_history_table=%s&amp;include_reference_table=%s&amp;include_linked_content=%s&amp;include_report_content=%s&amp;display_svg=%s" name="default_version"></iframe>\' % (context.absolute_url(), context.REQUEST.get("override_document_description", ""), context.REQUEST.get("override_document_short_title", ""), context.REQUEST.get("override_document_title", ""), context.REQUEST.get("override_document_version", ""), context.REQUEST.get("override_logo_reference", ""), context.REQUEST.get("override_source_organisation_title", ""), context.REQUEST.get("override_source_person_title", ""),context.REQUEST.get("override_document_reference", ""),context.REQUEST.get("include_content_table", 1), context.REQUEST.get("include_history_table", 0),context.REQUEST.get("include_reference_table", 0),context.REQUEST.get("include_linked_content", 0),context.REQUEST.get("include_report_content", 0), context.REQUEST.get("display_svg", "png"))
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -253,7 +253,7 @@ ...@@ -253,7 +253,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Logo Reference</string> </value> <value> <string>Logo</string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>truncate</string> </key>
......
...@@ -299,11 +299,7 @@ ...@@ -299,11 +299,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string>python: here.Base_encodeLeafletUrl()</string> </value>
python: \'<iframe width="100%%" height="500" style="background-color:#FFFFFF;box-sizing:border-box;-wekbit-box-sizing:border-box;" src="%s/WebPage_viewAsWeb?portal_skin=Leaflet&amp;override_source_person_title=%s&amp;override_source_organisation_title=%s&amp;override_logo_reference=%s&amp;display_side=%s&amp;override_leaflet_header_title=%s&amp;display_svg=%s" name="default_version"></iframe>\' % (context.absolute_url(), context.REQUEST.get("override_source_person_title", ""), context.REQUEST.get("override_source_organisation_title", ""), context.REQUEST.get("override_logo_reference", ""), context.REQUEST.get("display_side", 1), context.REQUEST.get("override_leaflet_header_title", ""), context.REQUEST.get("display_svg", "png"))
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -253,7 +253,7 @@ ...@@ -253,7 +253,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Logo Reference</string> </value> <value> <string>Logo</string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>truncate</string> </key>
......
...@@ -299,11 +299,7 @@ ...@@ -299,11 +299,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string>python: here.Base_encodeLetterUrl()</string> </value>
python: \'<iframe width="100%%" height="500" style="background-color:#FFFFFF;box-sizing:border-box;-wekbit-box-sizing:border-box;" src="%s/WebPage_viewAsWeb?portal_skin=Letter&amp;override_source_person_title=%s&amp;override_source_organisation_title=%s&amp;override_destination_person_title=%s&amp;override_destination_organisation_title=%s&amp;display_head=%s&amp;override_date=%s&amp;display_svg=%s&amp;destination_position_in_letter=%s&amp;display_sender_company_above_recipient=%s&amp;destination_position_padding_left=%s" name="default_version"></iframe>\' % (context.absolute_url(), context.REQUEST.get("override_source_person_title", ""), context.REQUEST.get("override_source_organisation_title", ""), context.REQUEST.get("override_destination_person_title", ""), context.REQUEST.get("override_destination_organisation_title", ""), context.REQUEST.get("display_head", 1), context.REQUEST.get("override_date", ""), context.REQUEST.get("display_svg", "png"), context.REQUEST.get("destination_position_in_letter", "right"), context.REQUEST.get("display_sender_company_above_recipient", 0), context.REQUEST.get(\'destination_position_padding_left\', \'100px\'))
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -299,11 +299,7 @@ ...@@ -299,11 +299,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string>python: here.Base_encodePressReleaseUrl()</string> </value>
python: \'<iframe width="100%%" height="500" style="background-color:#FFFFFF;box-sizing:border-box;-wekbit-box-sizing:border-box;" src="%s/WebPage_viewAsWeb?portal_skin=Release&amp;override_source_person_title=%s&amp;override_source_organisation_title=%s&amp;display_svg=%s&amp;display_about=%s" name="default_version"></iframe>\' % (context.absolute_url(), context.REQUEST.get("override_source_person_title", ""), context.REQUEST.get("override_source_organisation_title", ""), context.REQUEST.get("display_svg", "png"), context.REQUEST.get("display_about", 1))
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -299,11 +299,7 @@ ...@@ -299,11 +299,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string>python: here.Base_encodeSlideShowUrl()</string> </value>
python: \'<iframe width="100%%" height="500" style="background-color:#FFFFFF;box-sizing:border-box;-wekbit-box-sizing:border-box;" src="%s/WebPage_viewAsWeb?portal_skin=Slide&amp;override_source_organisation_title=%s&amp;override_logo_reference=%s&amp;display_svg=%s&amp;display_note=%s" name="default_version"></iframe>\' % (here.absolute_url(), context.REQUEST.get("override_source_organisation_title", ""), context.REQUEST.get("override_logo_reference", ""), context.REQUEST.get("display_svg", "png"), context.REQUEST.get("display_note", 1))
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -253,7 +253,7 @@ ...@@ -253,7 +253,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Logo Reference</string> </value> <value> <string>Logo</string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>truncate</string> </key>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment