[Erp5-report] r40243 kazuhiko - in /erp5/trunk/bt5/erp5_web_blog: SkinTemplateItem/portal_s...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Nov 12 16:06:54 CET 2010
Author: kazuhiko
Date: Fri Nov 12 16:06:54 2010
New Revision: 40243
URL: http://svn.erp5.org?rev=40243&view=rev
Log:
* display whole HTML in list mode instead of calling WebSection_getFirstParagraph, that is far from perfect.
* fix invalid HTML.
Added:
erp5/trunk/bt5/erp5_web_blog/bt/change_log
Removed:
erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_getFirstParagraph.xml
Modified:
erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/ListBox_viewAsBlog.xml
erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_viewBlogFrontPage/listbox.xml
erp5/trunk/bt5/erp5_web_blog/bt/revision
Modified: erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/ListBox_viewAsBlog.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/ListBox_viewAsBlog.xml?rev=40243&r1=40242&r2=40243&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/ListBox_viewAsBlog.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/ListBox_viewAsBlog.xml [utf8] Fri Nov 12 16:06:54 2010
@@ -59,7 +59,7 @@
date_rendered python: date_renderer(date)">\n
\n
<div class="post_head">\n
- <a tal:attributes="href url"><h1 tal:content="title">This is the title of the blog post</h1></a>\n
+ <h1><a tal:attributes="href url" tal:content="title">This is the title of the blog post</a></h1>\n
\n
<small class="post_time">\n
<strong tal:content="structure date_rendered">date</strong>\n
@@ -70,13 +70,13 @@
\n
</div><!--End post_head -->\n
\n
- <div class="post_body" tal:replace="structure summary">Here is a blog post content</div>\n
+ <div class="post_body" tal:content="structure summary">Here is a blog post content</div>\n
\n
<div class="post_read_more"><a tal:attributes="href url" i18n:translate="" i18n:domain="ui">Read more</a></div>\n
<div class="post_bottom">\n
<a tal:attributes="href comments_url"><tal:block tal:replace="comment_count">0</tal:block> <tal:block i18n:translate="" i18n:domain="ui">comment</tal:block></a> | \n
- <tal:block i18n:translate="" i18n:domain="ui">Share</tal:block>: <a title="Facebook" tal:attributes="href facebook_url"><img width="20px" alt="Facebook logo" src="erp5_web_blog_image/facebook-button.png"></a> \n
- <a title="Twitter" tal:attributes="href twitter_url"><img width="20px" alt="Twitter Logo" src="erp5_web_blog_image/twitter-button.png"></a>\n
+ <tal:block i18n:translate="" i18n:domain="ui">Share</tal:block>: <a title="Facebook" tal:attributes="href facebook_url"><img width="20px" alt="Facebook logo" src="erp5_web_blog_image/facebook-button.png" /></a>\n
+ <a title="Twitter" tal:attributes="href twitter_url"><img width="20px" alt="Twitter Logo" src="erp5_web_blog_image/twitter-button.png" /></a>\n
\n
</div><!--End post_bottom-->\n
\n
@@ -87,8 +87,7 @@
\n
<tal:block tal:condition="not: repeat/line/end"><br /><hr class="post_separator" /></tal:block>\n
\n
-</tal:block>\n
-
+</tal:block>
]]></unicode> </value>
</item>
Removed: erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_getFirstParagraph.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_getFirstParagraph.xml?rev=40242&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_getFirstParagraph.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_getFirstParagraph.xml (removed)
@@ -1,151 +0,0 @@
-<?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[
-
-"""\n
- This simple script returns the first paragraph of an HTML or raw text.\n
- The separator is specified through the layout property \n
- layout_blog_first_part_separator.\n
- In the case of a raw text, the first line is returned, splitted by \\n.\n
-"""\n
-content = context.getTextContent()\n
-separator = "</p>"\n
-if hasattr(context, \'REQUEST\'):\n
- here = context.REQUEST.get(\'current_web_section\', None)\n
- if here is not None:\n
- separator = here.getLayoutProperty(\'layout_blog_first_part_separator\', separator)\n
-\n
-if context.getContentType() == "text/html":\n
- # We must analyse the separator a bit.\n
- # XXXX: this whole logic is too light for this problem, but I don\'t want to parse the whole HTML.\n
- if "</" in separator:\n
- # We will repeat the separator to be sure the content is approximately XHTML valid.\n
- return content.split(separator)[0] + separator\n
- else:\n
- return content.split(separator)[0]\n
-else:\n
- return content.split("\\n")[0]\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>content</string>
- <string>separator</string>
- <string>hasattr</string>
- <string>None</string>
- <string>here</string>
- <string>_getitem_</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>WebSection_getFirstParagraph</string> </value>
- </item>
- <item>
- <key> <string>warnings</string> </key>
- <value>
- <tuple/>
- </value>
- </item>
- </dictionary>
- </pickle>
- </record>
-</ZopeData>
Modified: erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_viewBlogFrontPage/listbox.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_viewBlogFrontPage/listbox.xml?rev=40243&r1=40242&r2=40243&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_viewBlogFrontPage/listbox.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_viewBlogFrontPage/listbox.xml [utf8] Fri Nov 12 16:06:54 2010
@@ -374,7 +374,7 @@
<string>Reference</string>
</tuple>
<tuple>
- <string>WebSection_getFirstParagraph</string>
+ <string>asStrippedHTML</string>
<string>Summary</string>
</tuple>
<tuple>
Added: erp5/trunk/bt5/erp5_web_blog/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_blog/bt/change_log?rev=40243&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_web_blog/bt/change_log (added)
+++ erp5/trunk/bt5/erp5_web_blog/bt/change_log [utf8] Fri Nov 12 16:06:54 2010
@@ -0,0 +1,3 @@
+2010-11-12 Kazuhiko
+* display whole HTML in list mode instead of calling WebSection_getFirstParagraph, that is far from perfect.
+* fix invalid HTML.
\ No newline at end of file
Modified: erp5/trunk/bt5/erp5_web_blog/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_blog/bt/revision?rev=40243&r1=40242&r2=40243&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_blog/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_blog/bt/revision [utf8] Fri Nov 12 16:06:54 2010
@@ -1 +1 @@
-79
\ No newline at end of file
+80
\ No newline at end of file
More information about the Erp5-report
mailing list