[Erp5-report] r6296 - in /erp5/trunk/bt5/erp5_web: SkinTemplateItem/portal_skins/erp5_web/ ...
nobody at svn.erp5.org
nobody at svn.erp5.org
Sat Mar 25 18:33:21 CET 2006
Author: vincent
Date: Sat Mar 25 18:33:17 2006
New Revision: 6296
URL: http://svn.erp5.org?rev=6296&view=rev
Log:
Add "default_layout" support, so the website layout knows howto behave when displaying a form (needed buttons & hidden fields,...).
Fixed some functions returning overcomplicated paths or returning just a title.
Improved breadcrumb generation : now can also use the short title if present.
Modified:
erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebPage_view/my_description.xml
erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getBreadcrumb.xml
erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getDocumentUrl.xml
erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getDocumentValue.xml
erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getSection.xml
erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_globalDefinition.xml
erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/section_form_view.xml
erp5/trunk/bt5/erp5_web/bt/template_action_path_list
Modified: erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebPage_view/my_description.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebPage_view/my_description.xml?rev=6296&r1=6295&r2=6296&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebPage_view/my_description.xml (original)
+++ erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebPage_view/my_description.xml Sat Mar 25 18:33:17 2006
@@ -219,7 +219,7 @@
</item>
<item>
<key> <string>description</string> </key>
- <value> <string></string> </value>
+ <value> <string>Short description that will appear in the search result list.</string> </value>
</item>
<item>
<key> <string>editable</string> </key>
Modified: erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getBreadcrumb.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getBreadcrumb.xml?rev=6296&r1=6295&r2=6296&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getBreadcrumb.xml (original)
+++ erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getBreadcrumb.xml Sat Mar 25 18:33:17 2006
@@ -71,10 +71,10 @@
html_list = []\n
\n
for crumb in context.WebSite_getBreadcrumbValue():\n
- if crumb.getTitle() is None or crumb.getTitle() == \'\':\n
- text = crumb.getId()\n
- else:\n
- text = crumb.getTitle()\n
+ text = None\n
+ for property in (\'title\', \'short_title\', \'id\'):\n
+ if text in (None, \'\') and hasattr(crumb, property):\n
+ text = getattr(crumb, property)\n
html_list.append(\'<a href="%s">%s</a>\' % (crumb.WebSite_getUrl(), text))\n
\n
return \' > \'.join(html_list)\n
@@ -127,6 +127,9 @@
<string>crumb</string>
<string>None</string>
<string>text</string>
+ <string>property</string>
+ <string>hasattr</string>
+ <string>getattr</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getDocumentUrl.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getDocumentUrl.xml?rev=6296&r1=6295&r2=6296&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getDocumentUrl.xml (original)
+++ erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getDocumentUrl.xml Sat Mar 25 18:33:17 2006
@@ -66,9 +66,10 @@
</item>
<item>
<key> <string>_body</string> </key>
- <value> <string>document = context.WebSite_getDocumentValue()\n
+ <value> <string>#XXX This script should be named WebSite_getDocument\n
+document = context.WebSite_getDocumentValue()\n
if document is not None:\n
- return document.WebSite_getUrl()\n
+ return \'%s/%s\' % (context.WebSite_getSection(),document.getReference())\n
return context.WebSite_getUrl()\n
</string> </value>
</item>
Modified: erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getDocumentValue.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getDocumentValue.xml?rev=6296&r1=6295&r2=6296&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getDocumentValue.xml (original)
+++ erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getDocumentValue.xml Sat Mar 25 18:33:17 2006
@@ -70,6 +70,8 @@
if portal_type == \'Web Site\':\n
return None\n
if portal_type == \'Web Section\':\n
+ if context.REQUEST[\'editable_mode\']:\n
+ return context\n
return context.getDefaultSourceValue()\n
return context\n
</string> </value>
@@ -122,6 +124,7 @@
<string>context</string>
<string>portal_type</string>
<string>None</string>
+ <string>_getitem_</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getSection.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getSection.xml?rev=6296&r1=6295&r2=6296&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getSection.xml (original)
+++ erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_getSection.xml Sat Mar 25 18:33:17 2006
@@ -68,7 +68,7 @@
<key> <string>_body</string> </key>
<value> <string>section = context.WebSite_getSectionValue()\n
if section is not None:\n
- return section.getTitle()\n
+ return section.WebSite_getUrl()\n
return None\n
</string> </value>
</item>
Modified: erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_globalDefinition.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_globalDefinition.xml?rev=6296&r1=6295&r2=6296&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_globalDefinition.xml (original)
+++ erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_globalDefinition.xml Sat Mar 25 18:33:17 2006
@@ -55,16 +55,18 @@
<value> <string encoding="cdata"><![CDATA[
<tal:block metal:define-macro="global_definition"\n
- tal:define="filtered_actions python:context.portal_actions.listFilteredActionsFor(context);\n
- object_actions filtered_actions/object_action | nothing;\n
- global object_actions python: context.WebSite_replaceActionUrl(object_actions);\n
- workflow_actions filtered_actions/workflow | nothing;\n
- global workflow_actions python: context.WebSite_replaceActionUrl(workflow_actions);\n
- jump_actions filtered_actions/object_jump | nothing;\n
- global jump_actions python: context.WebSite_replaceActionUrl(jump_actions);\n
- view_actions filtered_actions/object_view | nothing;\n
- global view_actions python: context.WebSite_replaceActionUrl(view_actions);\n
-"/>
+ tal:define="document context/WebSite_getDocumentValue">\n
+ <tal:block tal:define="filtered_actions python:document.portal_actions.listFilteredActionsFor(document);\n
+ object_actions filtered_actions/object_action | nothing;\n
+ global object_actions python: document.WebSite_replaceActionUrl(object_actions);\n
+ workflow_actions filtered_actions/workflow | nothing;\n
+ global workflow_actions python: document.WebSite_replaceActionUrl(workflow_actions);\n
+ jump_actions filtered_actions/object_jump | nothing;\n
+ global jump_actions python: document.WebSite_replaceActionUrl(jump_actions);\n
+ view_actions filtered_actions/object_view | nothing;\n
+ global view_actions python: document.WebSite_replaceActionUrl(view_actions);\n
+ "/>\n
+</tal:block>
]]></string> </value>
</item>
Modified: erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/section_form_view.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/section_form_view.xml?rev=6296&r1=6295&r2=6296&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/section_form_view.xml (original)
+++ erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/section_form_view.xml Sat Mar 25 18:33:17 2006
@@ -59,7 +59,8 @@
ignore_layout request/ignore_layout | nothing;\n
editable_mode request/editable_mode | nothing;\n
layout_form python:not(layout_form_id) or ignore_layout or getattr(here, layout_form_id, None);\n
- layout_id layout_form/pt | string:view_master;">\n
+ default_layout string:view_master;\n
+ layout_id layout_form/pt | default_layout;">\n
<tal:block metal:use-macro="python:getattr(here,layout_id).macros[\'master\']">\n
<tal:block metal:fill-slot="main">\n
<tal:block tal:condition="python:(not editable_mode) and (not ignore_layout) and default_content is not None">\n
@@ -67,10 +68,6 @@
global form python:here.WebPage_view;\n
global default_content_title python:here.getTitle()"/>\n
</tal:block>\n
- <tal:block tal:replace="here/getPath"/><br/>\n
- <tal:block tal:condition="not: editable_mode">not </tal:block>editable_mode<br/>\n
- <tal:block tal:condition="not: ignore_layout">not </tal:block>ignore_layout<br/>\n
- <tal:block tal:replace="default_content/getPath"/><br/>\n
<tal:block metal:use-macro="here/form_view/macros/form_render" />\n
</tal:block>\n
</tal:block>\n
Modified: erp5/trunk/bt5/erp5_web/bt/template_action_path_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/bt/template_action_path_list?rev=6296&r1=6295&r2=6296&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/bt/template_action_path_list (original)
+++ erp5/trunk/bt5/erp5_web/bt/template_action_path_list Sat Mar 25 18:33:17 2006
@@ -1,11 +1,13 @@
Web Page Module | list_ui
Web Page Module | sort_on
Web Page Module | view
+Web Page | history
Web Page | list
Web Page | metadata
Web Page | related
Web Page | render
Web Page | view
+Web Section | history
Web Section | metadata
Web Section | predicate
Web Section | section
@@ -13,6 +15,7 @@
Web Site Module | list_ui
Web Site Module | sort_on
Web Site Module | view
+Web Site | history
Web Site | metadata
Web Site | predicate
Web Site | view
More information about the Erp5-report
mailing list