Commit 13a84e37 authored by Ivan Tyagov's avatar Ivan Tyagov

User can contribute Contacts & Projects if having needed permissions.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34732 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 90804759
...@@ -107,6 +107,20 @@ ...@@ -107,6 +107,20 @@
</a>\n </a>\n
</li>\n </li>\n
</tal:block>\n </tal:block>\n
<tal:block tal:condition="python: here.Base_checkPermission(\'person_module\', \'Add portal content\')">\n
<li>\n
<a href="#" i18n:translate="" i18n:domain="ui" tal:attributes="href string:${current_web_section_url}/PersonModule_createNewPerson">\n
New Contact\n
</a>\n
</li>\n
</tal:block>\n
<tal:block tal:condition="python: here.Base_checkPermission(\'project_module\', \'Add portal content\')">\n
<li>\n
<a href="#" i18n:translate="" i18n:domain="ui" tal:attributes="href string:${current_web_section_url}/ProjectModule_createNewProject">\n
New Project\n
</a>\n
</li>\n
</tal:block>\n
</ul>\n </ul>\n
<!--[if lte IE 6]></td></tr></table></a><![endif]-->\n <!--[if lte IE 6]></td></tr></table></a><![endif]-->\n
</li>\n </li>\n
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<string>css_class</string> <string>css_class</string>
<string>default</string> <string>default</string>
<string>editable</string> <string>editable</string>
<string>enabled</string>
<string>title</string> <string>title</string>
</list> </list>
</value> </value>
...@@ -72,6 +73,12 @@ ...@@ -72,6 +73,12 @@
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -107,6 +114,10 @@ ...@@ -107,6 +114,10 @@
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string>my_editor_field</string> </value> <value> <string>my_editor_field</string> </value>
...@@ -149,4 +160,20 @@ python: \'<a class="bt-small" style="width:250px;" href="%s/person_module/Person ...@@ -149,4 +160,20 @@ python: \'<a class="bt-small" style="width:250px;" href="%s/person_module/Person
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.Base_checkPermission(\'project_module\', \'Add portal content\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
<?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>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>"""\n
Create new Project object and redirect to it.\n
"""\n
\n
project = context.project_module.newContent(portal_type = \'Project\')\n
keep_items = dict(editable_mode=1,\n
portal_status_message=context.Base_translateString("New Project Created"))\n
return project.Base_redirect(\'view\', keep_items)\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>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>_getattr_</string>
<string>context</string>
<string>project</string>
<string>dict</string>
<string>keep_items</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>ProjectModule_createNewProject</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
1340 1341
\ 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