[Erp5-report] r34244 ivan - in /erp5/trunk/bt5/erp5_discussion: SkinTemplateItem/portal_ski...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Apr 1 13:53:47 CEST 2010


Author: ivan
Date: Thu Apr  1 13:53:46 2010
New Revision: 34244

URL: http://svn.erp5.org?rev=34244&view=rev
Log:
Make it possible use in anonymous mode.

Added:
    erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/DiscussionPost_getAuthorDict.xml
    erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/DiscussionPost_view/my_text_content.xml
    erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/erp5_discussion.css.xml
Modified:
    erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/DiscussionPost_view.xml
    erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/ListBox_asPostStyleHTML.xml
    erp5/trunk/bt5/erp5_discussion/bt/revision

Added: erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/DiscussionPost_getAuthorDict.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/DiscussionPost_getAuthorDict.xml?rev=34244&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/DiscussionPost_getAuthorDict.xml (added)
+++ erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/DiscussionPost_getAuthorDict.xml [utf8] Thu Apr  1 13:53:46 2010
@@ -1,0 +1,146 @@
+<?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>

Modified: erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/DiscussionPost_view.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/DiscussionPost_view.xml?rev=34244&r1=34243&r2=34244&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/DiscussionPost_view.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/DiscussionPost_view.xml [utf8] Thu Apr  1 13:53:46 2010
@@ -79,7 +79,9 @@
                 <item>
                     <key> <string>bottom</string> </key>
                     <value>
-                      <list/>
+                      <list>
+                        <string>my_text_content</string>
+                      </list>
                     </value>
                 </item>
                 <item>

Added: erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/DiscussionPost_view/my_text_content.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/DiscussionPost_view/my_text_content.xml?rev=34244&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/DiscussionPost_view/my_text_content.xml (added)
+++ erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/DiscussionPost_view/my_text_content.xml [utf8] Thu Apr  1 13:53:46 2010
@@ -1,0 +1,148 @@
+<?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>

Modified: erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/ListBox_asPostStyleHTML.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/ListBox_asPostStyleHTML.xml?rev=34244&r1=34243&r2=34244&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/ListBox_asPostStyleHTML.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/ListBox_asPostStyleHTML.xml [utf8] Thu Apr  1 13:53:46 2010
@@ -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

Added: erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/erp5_discussion.css.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/erp5_discussion.css.xml?rev=34244&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/erp5_discussion.css.xml (added)
+++ erp5/trunk/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/erp5_discussion.css.xml [utf8] Thu Apr  1 13:53:46 2010
@@ -1,0 +1,43 @@
+<?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>

Modified: erp5/trunk/bt5/erp5_discussion/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_discussion/bt/revision?rev=34244&r1=34243&r2=34244&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_discussion/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_discussion/bt/revision [utf8] Thu Apr  1 13:53:46 2010
@@ -1,1 +1,1 @@
-36
+37




More information about the Erp5-report mailing list