From b63261d4f155560d82fc5012fc9b514cf7234d30 Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Thu, 18 Nov 2010 12:24:39 +0000
Subject: [PATCH] we no longer need '/view' in the permanent url.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40359 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_web/WebSection_getPermanentURL.xml       | 15 ---------------
 bt5/erp5_web/bt/revision                          |  2 +-
 2 files changed, 1 insertion(+), 16 deletions(-)

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 0dd6ea2911..649509086d 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 5ed13cbaef..2478c955ec 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
-- 
2.30.9