Commit e081a279 authored by Ivan Tyagov's avatar Ivan Tyagov

Make it possible use in anonymous mode.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34244 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c091c3e9
<?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
Get author details.\n
"""\n
portal = context.getPortalObject()\n
\n
author = context.getSourceValue()\n
result = {\'author_url\': None,\n
\'author_signature\': None,\n
\'author_title\': \'Unknown User\'}\n
\n
if author is not None:\n
result[\'author_url\'] = author.getAbsoluteUrl()\n
result[\'author_signature\'] = portal.ERP5Site_getUserPreferredForumSignature(author.getReference())\n
result[\'author_title\'] = author.getTitle()\n
\n
return result\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</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>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>author</string>
<string>None</string>
<string>result</string>
<string>_write_</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>DiscussionPost_getAuthorDict</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -79,7 +79,9 @@
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
<list>
<string>my_text_content</string>
</list>
</value>
</item>
<item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>css_class</string>
<string>editable</string>
<string>text_editor</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_text_content</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>text_editor</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>css_class</string> </key>
<value> <string>page</string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_text_content</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>text_editor</string> </key>
<value> <string>fck_editor</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Body</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:(here.portal_preferences.getPreferredTextFormat() == \'text/html\' and here.portal_preferences.getPreferreTextEditor()) or \'text_area\'d</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -90,7 +90,8 @@
</tal:block>\n
</tal:block>\n
\n
<tal:block tal:define="expand python: 1">\n
<tal:block tal:define="expand python: 1;\n
isUserAllowedToPost python: real_context.DiscussionThread_isUserAllowedToPost()">\n
<tal:block metal:use-macro="template/macros/ListBoxContainer">\n
<tal:block metal:fill-slot="ListBoxBody">\n
<div class="ListContent" style="margin-bottom:5px;">\n
......@@ -98,56 +99,65 @@
<div style="margin:5px; padding:10px; background-color:#ffffff; border-radius: 15px 15px; -moz-border-radius: 10px;"\n
tal:define="event line/getBrain;\n
event_object event/getObject;\n
event_source event_object/getSourceValue;\n
author_dict event_object/DiscussionPost_getAuthorDict;\n
author_url author_dict/author_url;\n
author_signature author_dict/author_signature;\n
author_title author_dict/author_title;\n
event_id event_object/getId;\n
event_uid event_object/getUid;\n
event_title event_object/getTitle;\n
event_creation_date event_object/getCreationDate;">\n
event_creation_date event_object/getCreationDate;\n
event_validation_state_title event_object/getTranslatedValidationStateTitle;\n
event_stripped_html event_object/asStrippedHTML;">\n
\n
<div style="background-color:#efefef; padding:3px; height:20px; border-left:solid 3px #DE9435">\n
<div style="float:left; height:20px;">\n
<a tal:attributes="href event_id">\n
<a tal:attributes="href string:${event_id}/view">\n
<span style="margin:0; color #D98135; padding-left:5px; font:bold 1.2em Helvetica, Arial, sans-serif; margin-top:5px" \n
tal:content="event_title"></span>\n
</a>\n
</div>\n
<div style="float:left;height:20px;margin-left:10px;margin-top:3px;">\n
<span tal:content="python: event_object.getTranslatedValidationStateTitle()"></span>\n
<span tal:content="event_validation_state_title"/>\n
</div>\n
<div style="float:right; height:20px;">\n
<span style="color:#333; font-size:90%; margin:2px 0;">\n
by \n
<a tal:attributes="href python: event_source.absolute_url()"> \n
<span style="color:#a40;font-size:90%;" \n
tal:content="python: (event_source is not None and event_source.getTitle()) or \'User unknown\'"></span> </a> \n
<a tal:attributes="href author_url"> \n
<span style="color:#a40;font-size:90%;" \n
tal:content="author_title"/>\n
</a> \n
on \n
<span tal:replace="event_creation_date"></span>\n
<span tal:replace="event_creation_date"/>\n
</span>\n
</div>\n
</div>\n
<hr>\n
<div style="margin-left:10px;">\n
<span style="color:black;margin-top:10px;margin-bottom:10px;"\n
tal:content="structure python:event_object.asStrippedHTML()">\n
</span>\n
<br />\n
tal:content="structure event_stripped_html"/>\n
<br/>\n
</div>\n
\n
<tal:block tal:define="signature python: real_context.ERP5Site_getUserPreferredForumSignature(event_source.getReference())"\n
tal:condition="python: signature is not None">\n
<tal:block tal:condition="python: author_signature is not None">\n
<hr>\n
<div style="margin-left:10px;">\n
<span style="color:#aaa" tal:content="signature"></span>\n
<span style="color:#aaa" \n
tal:content="author_signature"/>\n
</div>\n
</tal:block>\n
\n
<hr>\n
<input type="checkbox" name="good_uid" tal:attributes="value event/getUid; id python: \'listbox_cb_%s\' % (event.getUid())" style="visibility:hidden">\n
<button tal:condition="python: real_context.DiscussionThread_isUserAllowedToPost()" \n
<input type="checkbox" name="good_uid" \n
tal:attributes="value event_uid; id python: \'listbox_cb_%s\' % (event_uid)" \n
style="visibility: hidden">\n
<button tal:condition="isUserAllowedToPost" \n
type="submit" \n
title="Reply" \n
name="DiscussionThread_viewCreateNewDiscussionPostDialog:method" \n
style="border:dashed 1px #3D6474; background-color:#eee; padding:3px;" \n
tal:attributes="onClick python: \'getElementById(\\\'listbox_cb_%s\\\').checked = true\' % (event_object.getUid())">\n
<span>Reply</span>\n
Reply\n
</button>\n
<tal:block tal:condition="python:real_context.portal_membership.checkPermission(\'Delete objects\', event_object)">\n
<button type="submit" \n
......@@ -155,7 +165,7 @@
name="DiscussionThread_deleteDiscussionPost:method"\n
tal:attributes="onClick python: \'deleteDiscussionPost(\\\'%s\\\')\' %event.getId()"\n
style="border:dashed 1px #3D6474; background-color:#FF654A; padding:3px;">\n
<span>Delete</span>\n
Delete\n
</button>\n
</tal:block>\n
</div>\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="File" module="OFS.Image"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts70122039.98</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>erp5_discussion.css</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/css</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
36
\ No newline at end of file
37
\ 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