Commit 8c0bab27 authored by Ivan Tyagov's avatar Ivan Tyagov

Setup needed preferences for DMS.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38572 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cf801058
...@@ -51,7 +51,18 @@ ...@@ -51,7 +51,18 @@
</thead><tbody>\n </thead><tbody>\n
\n \n
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />\n <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />\n
\n <tr>\n
<td>openAndWait</td>\n
<td>${base_url}/person_module/Zuite_setupDMS</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Done</td>\n
<td></td>\n
</tr>\n
<span metal:use-macro="container/Zuite_CommonTemplate/macros/wait_for_activities">\n
Wait for activities</span>\n
<tr>\n <tr>\n
<td>openAndWait</td>\n <td>openAndWait</td>\n
<td>${base_url}/person_module/view?reset:int=1</td>\n <td>${base_url}/person_module/view?reset:int=1</td>\n
......
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
</thead><tbody>\n </thead><tbody>\n
\n \n
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />\n <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />\n
\n
<tr>\n <tr>\n
<td>openAndWait</td>\n <td>openAndWait</td>\n
<td>${base_url}/portal_contributions/view</td>\n <td>${base_url}/portal_contributions/view</td>\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_dms_ui_test</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></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 encoding="cdata"><![CDATA[
# Setup System Preference\n
dms_system_preference_id = \'dms_system_preference_ui_tests\'\n
portal_preferences = context.portal_preferences\n
if dms_system_preference_id not in portal_preferences.objectIds():\n
dms_preference = portal_preferences.newContent(\n
id = dms_system_preference_id,\n
portal_type = \'System Preference\',\n
priority = 1,\n
preferred_document_reference_regular_expression = \'(?P<reference>[a-zA-Z0-9-_.]+-[a-zA-Z0-9-_.]+)(|-(?P<version>[0-9a-zA-Z.]+))(|-(?P<language>[a-z]{2})[^-]*)?\',\n
preferred_document_file_name_regular_expression = \'(?P<node_reference>[a-zA-Z0-9_-]+)-(?P<local_reference>[a-zA-Z0-9_.]+)-(?P<version>[0-9a-zA-Z.]+)-(?P<language>[a-z]{2})[^-]*?\',\n
preferred_synchronous_metadata_discovery = True,\n
preferred_redirect_to_document = True,\n
preferred_ooodoc_server_address = \'localhost\',\n
preferred_ooodoc_server_port_number = 8008)\n
dms_preference.enable()\n
# Setup Preference so we can setup Access Tab\n
dms_preference_id = \'dms_preference_ui_tests\'\n
if dms_preference_id not in portal_preferences.objectIds():\n
dms_preference = portal_preferences.newContent(\n
id = dms_preference_id,\n
portal_type = \'Preference\',\n
priority = 1,\n
preferred_html_style_access_tab=1)\n
dms_preference.enable()\n
\n
# Publish all knowledge pad gadgets\n
for gadget in context.portal_gadgets.objectValues():\n
if gadget.getValidationState() == \'invisible\':\n
gadget.visible()\n
gadget.public()\n
\n
print "Done"\n
return printed\n
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></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>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_print_</string>
<string>_print</string>
<string>dms_system_preference_id</string>
<string>_getattr_</string>
<string>context</string>
<string>portal_preferences</string>
<string>True</string>
<string>dms_preference</string>
<string>dms_preference_id</string>
<string>_getiter_</string>
<string>gadget</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Zuite_setupDMS</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</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># Delete System Preference\n
portal_preferences = context.portal_preferences\n
portal_preferences.manage_delObjects([\'dms_system_preference_ui_tests\', \'dms_preference_ui_tests\'])\n
context.portal_caches.clearAllCache()\n
print "Done"\n
return printed\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></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>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_print_</string>
<string>_print</string>
<string>_getattr_</string>
<string>context</string>
<string>portal_preferences</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Zuite_tearDownDMS</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
10 12
\ No newline at end of file \ 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