Commit 1d331b95 authored by Roque's avatar Roque

erp5_discussion: update forum threads view

parent 28a163a3
......@@ -56,7 +56,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View threads (getDocumentValueList)</string> </value>
<value> <string>Discussion Threads</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
......@@ -73,7 +73,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/DiscussionForum_viewForm</string> </value>
<value> <string>string:${object_url}/DiscussionForum_viewThread</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -71,7 +71,11 @@
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
<list>
<string>listbox_response_count</string>
<string>listbox_author</string>
<string>listbox_last_post</string>
</list>
</value>
</item>
<item>
......@@ -91,7 +95,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DiscussionForum_viewForm</string> </value>
<value> <string>DiscussionForum_viewThread</string> </value>
</item>
<item>
<key> <string>method</string> </key>
......@@ -99,7 +103,7 @@
</item>
<item>
<key> <string>name</string> </key>
<value> <string>DiscussionForum_view</string> </value>
<value> <string>DiscussionForum_viewThread</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
......
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Discussion Threads (DiscussionForum_viewForm)</string> </value>
<value> <string>Discussion Threads</string> </value>
</item>
<item>
<key> <string>url_columns</string> </key>
......
......@@ -10,8 +10,8 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>css_class</string>
<string>default</string>
<string>display_width</string>
<string>editable</string>
<string>title</string>
</list>
......@@ -19,7 +19,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_title</string> </value>
<value> <string>listbox_author</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -55,16 +55,16 @@
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
......@@ -93,12 +93,12 @@
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>40</int> </value>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
......@@ -106,7 +106,7 @@
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
<value> <string>my_label_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
......@@ -118,7 +118,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Title</string> </value>
<value> <string>Post Author</string> </value>
</item>
</dictionary>
</value>
......@@ -128,16 +128,13 @@
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: context.REQUEST.get(\'discussion_post_title\',\'\')</string> </value>
<value> <string>python: cell.DiscussionThread_viewAuthorWidget()</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>css_class</string>
<string>default</string>
<string>editable</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_last_post</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>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</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>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></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></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_label_field</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>title</string> </key>
<value> <string>Latest Post Author</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: cell.DiscussionThread_viewLastPostWidget()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>css_class</string>
<string>default</string>
<string>editable</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_response_count</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>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</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>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></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></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_label_field</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>title</string> </key>
<value> <string>Responses</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: cell.countFolder(portal_type=\'Discussion Post\')[0][0]</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -6,5 +6,6 @@
result = []
for successor in context.getSuccessorValueList():
result.append({'title': successor.getTitle(),
'url': successor.absolute_url()})
'url': successor.File_getDownloadUrl(),
'content_type': successor.getPortalType()})
return result
......@@ -52,14 +52,6 @@
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Assignor</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DiscussionPost_getAttachmentList</string> </value>
......
......@@ -16,7 +16,6 @@ if is_temp_object:
discussion_post = discussion_thread.newContent(
portal_type = "Discussion Post",
title = title,
text_content = text_content,
source_value = person,
predecessor_value = predecessor,
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>title, text_content, form_id=\'view\', predecessor=None, file=None, **kw</string> </value>
<value> <string>text_content, form_id=\'view\', predecessor=None, file=None, **kw</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
......
......@@ -97,7 +97,6 @@
<key> <string>left reply-dialog</string> </key>
<value>
<list>
<string>your_title</string>
<string>your_text_content</string>
<string>your_file</string>
<string>your_captcha</string>
......
......@@ -10,9 +10,10 @@
<span tal:content="author_dict/author_title"
tal:condition="not:is_author_link_available"/>
<a class="listbox-row-discussion-thread-last-post-link"
<!-- TODO fix url to latest post -->
<!--a class="listbox-row-discussion-thread-last-post-link"
tal:attributes="href python: '%s/view?list_start=%s&reset=1#%s' %(here.getReference(), last_post.getId(), last_post.getUid())">
<img src="document_icon.gif" alt="Link To Post"/>
</a>
</a-->
</tal:block>
\ No newline at end of file
......@@ -76,7 +76,7 @@
<key> <string>left</string> </key>
<value>
<list>
<string>my_threads</string>
<string>my_posts</string>
</list>
</value>
</item>
......@@ -91,7 +91,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DiscussionForum_viewGadget</string> </value>
<value> <string>DiscussionThread_viewPosts</string> </value>
</item>
<item>
<key> <string>method</string> </key>
......@@ -99,7 +99,7 @@
</item>
<item>
<key> <string>name</string> </key>
<value> <string>DiscussionForum_view</string> </value>
<value> <string>DiscussionThread_viewPosts</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
......@@ -115,7 +115,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Discussion Forum</string> </value>
<value> <string>Discussion Posts</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_threads</string> </value>
<value> <string>my_posts</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -229,7 +229,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Discussion Threads (rjs gadget)</string> </value>
<value> <string>Discussion Posts</string> </value>
</item>
<item>
<key> <string>validator_field_id</string> </key>
......@@ -253,7 +253,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [(\'source_column\', \'Event_getSafeSourceTitle\'), (\'lines\', 100), ("query_dict", {"portal_type": "Discussion Thread", "follow_up__uid": context.getUid()})]</string> </value>
<value> <string>python: [(\'lines\', 15), (\'attachment_column\', \'DiscussionPost_getAttachmentList\'), ("query_dict", {"portal_type": "Discussion Post", "parent_relative_url": context.getRelativeUrl()})]</string> </value>
</item>
</dictionary>
</pickle>
......
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