diff --git a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getPermanentURL.xml b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getPermanentURL.xml index 0dd6ea2911bfa6c6846d72b4c9c61ebbcfed77fe..649509086de3ab90445aacc7da4ebb0b41cd6937 100644 --- a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getPermanentURL.xml +++ b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getPermanentURL.xml @@ -77,9 +77,6 @@ document reference.\n \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 @@ -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_url(), reference)\n <tuple> <string>document</string> <string>view</string> - <string>html_portal_type_list</string> <string>_getattr_</string> <string>portal_type</string> <string>reference</string> diff --git a/bt5/erp5_web/bt/revision b/bt5/erp5_web/bt/revision index 5ed13cbaef25a9e5c171b108615b62283f016ab3..2478c955ec863d4fb3021c3163ecb196b4fe9b3b 100644 --- a/bt5/erp5_web/bt/revision +++ b/bt5/erp5_web/bt/revision @@ -1 +1 @@ -1002 \ No newline at end of file +1003 \ No newline at end of file