Commit f4214905 authored by Gabriel Monnerat's avatar Gabriel Monnerat

2011-03-28 Gabriel

* Add script to configure UNG Web Site

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44688 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a0e0346b
......@@ -59,7 +59,7 @@
</item>
<item>
<key> <string>last_id</string> </key>
<value> <string>66</string> </value>
<value> <string>68</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......
......@@ -28,7 +28,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>destination/workflow_module/ung_configuration_workflow/14</string>
<string>destination/workflow_module/ung_configuration_workflow/68</string>
</tuple>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="State" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>destination/workflow_module/ung_configuration_workflow/14</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>67</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>State</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Web Site</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Transition" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>after_script_id</string> </key>
<value> <string>BusinessConfiguration_setupUNGWebSite</string> </value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>destination/workflow_module/ung_configuration_workflow/67</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>guard_expression</string> </key>
<value> <string>python: True</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>68</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Transition</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Configure Web Site</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n
isTransitionPossible = portal.portal_workflow.isTransitionPossible\n
\n
# enable erp5 preference\n
ung_preference = getattr(portal.portal_preferences, \'ung_preference\', None)\n
if ung_preference is not None and isTransitionPossible(ung_preference, \'enable\'):\n
ung_preference.enable()\n
\n
# publish the ung web site\n
ung_web_site = getattr(portal.web_site_module, \'ung\', None)\n
if ung_web_site is not None and isTransitionPossible(ung_web_site, \'publish\', None):\n
ung_web_site.publish()\n
\n
for web_section in ung_web_site.contentValues(portal_types=\'Web Section\'):\n
if isTransitionPossible(web_section, \'publish\', None):\n
web_section.publish()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BusinessConfiguration_setupUNGWebSite</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2011-03-28 Gabriel
* Add script to configure UNG Web Site
2011-03-24 Gabriel
* Initial commit.
\ No newline at end of file
9
\ No newline at end of file
10
\ No newline at end of file
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