[Erp5-report] r40359 kazuhiko - in /erp5/trunk/bt5/erp5_web: SkinTemplateItem/portal_skins/...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Nov 18 13:24:39 CET 2010
Author: kazuhiko
Date: Thu Nov 18 13:24:39 2010
New Revision: 40359
URL: http://svn.erp5.org?rev=40359&view=rev
Log:
we no longer need '/view' in the permanent url.
Modified:
erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getPermanentURL.xml
erp5/trunk/bt5/erp5_web/bt/revision
Modified: erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getPermanentURL.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getPermanentURL.xml?rev=40359&r1=40358&r2=40359&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getPermanentURL.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getPermanentURL.xml [utf8] Thu Nov 18 13:24:39 2010
@@ -78,9 +78,6 @@
\n
The document parameter is required.\n
\n
- If view is True, the url returned point to html content and can be opened in\n
- a browser (ie. + \'/view\' for ooo documents)\n
-\n
More sophisticated behaviours are possible.\n
\n
SUGGESTIONS:\n
@@ -91,14 +88,11 @@
- change the behaviour of WebSection_getPermanentURL\n
for documents which are not published.\n
"""\n
-html_portal_type_list = (\'Web Site\', \'Web Section\', \'Web Page\')\n
portal_type = document.getPortalType()\n
\n
# If no reference is defined, no way to build a permanent URL.\n
reference = document.getReference()\n
if not reference:\n
- if view and portal_type not in html_portal_type_list:\n
- return \'%s/view\' % document.absolute_url()\n
return document.absolute_url()\n
\n
# Return absolute URL if this is not an appropriate portal_type\n
@@ -106,23 +100,15 @@ portal = context.getPortalObject()\n
valid_portal_type_list = portal.getPortalDocumentTypeList()\n
portal_type = document.getPortalType()\n
if portal_type not in valid_portal_type_list:\n
-\n
- if view and portal_type not in html_portal_type_list:\n
- return \'%s/view\' % document.absolute_url()\n
return document.absolute_url()\n
\n
# Return absolute URL if this is not a \'live\' document\n
validation_state = (\'released\', \'released_alive\', \'published\', \'published_alive\',\n
\'shared\', \'shared_alive\', \'public\', \'validated\')\n
if document.getValidationState() not in validation_state:\n
- if view and portal_type not in html_portal_type_list:\n
- return \'%s/view\' % document.absolute_url()\n
return document.absolute_url()\n
\n
# Return the URL\n
-if view and portal_type not in html_portal_type_list:\n
- return \'%s/%s/view\' % (context.absolute_url(), reference)\n
-\n
web_section = context.getWebSectionValue()\n
if web_section is None:\n
web_section = context\n
@@ -165,7 +151,6 @@ return "%s/%s" % (web_section.absolute_u
<tuple>
<string>document</string>
<string>view</string>
- <string>html_portal_type_list</string>
<string>_getattr_</string>
<string>portal_type</string>
<string>reference</string>
Modified: erp5/trunk/bt5/erp5_web/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/bt/revision?rev=40359&r1=40358&r2=40359&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_web/bt/revision [utf8] Thu Nov 18 13:24:39 2010
@@ -1 +1 @@
-1002
\ No newline at end of file
+1003
\ No newline at end of file
More information about the Erp5-report
mailing list