[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication/TraversalViews - AbsoluteURL.py:1.6.4.1 configure.zcml:1.2.14.1

Christian Theune ct@gocept.com
Fri, 22 Nov 2002 17:38:17 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication/TraversalViews
In directory cvs.zope.org:/tmp/cvs-serv24198/ZopePublication/TraversalViews

Modified Files:
      Tag: ctheune-fix_appcontrol-branch
	AbsoluteURL.py configure.zcml 
Log Message:
First attempt for fix and for letting jim take a look

=== Zope3/lib/python/Zope/App/ZopePublication/TraversalViews/AbsoluteURL.py 1.6 => 1.6.4.1 ===
--- Zope3/lib/python/Zope/App/ZopePublication/TraversalViews/AbsoluteURL.py:1.6	Mon Oct 28 02:37:58 2002
+++ Zope3/lib/python/Zope/App/ZopePublication/TraversalViews/AbsoluteURL.py	Fri Nov 22 17:38:17 2002
@@ -127,7 +127,17 @@
 
         return ({'name':'', 'url': self.request.getApplicationURL()}, )
 
-        
 
+class ApplicationControlAbsoluteURL(SiteAbsoluteURL):
+    """Returns the absolute URL for the ApplicationController object.
+    """
+    # XXX This is hardcoded in conjunction to the hardcoded Traversal.
 
+
+    def __str__(self):
+        return SiteAbsoluteURL.__str__(self) + "++etc++ApplicationController"
+
+    def breadcrumbs(self):
+        breadcrumb =  SiteAbsoluteURL.breadcrumbs(self)
+        return ({'name':'++etc++ApplicationController', 'url':breadcrumb[0]["url"]+"++etc++ApplicationController"})
 


=== Zope3/lib/python/Zope/App/ZopePublication/TraversalViews/configure.zcml 1.2 => 1.2.14.1 ===
--- Zope3/lib/python/Zope/App/ZopePublication/TraversalViews/configure.zcml:1.2	Thu Jun 20 11:55:06 2002
+++ Zope3/lib/python/Zope/App/ZopePublication/TraversalViews/configure.zcml	Fri Nov 22 17:38:17 2002
@@ -17,6 +17,13 @@
     allowed_interface=".AbsoluteURL.IAbsoluteURL" />
 
 <browser:view
+    for="Zope.App.OFS.ApplicationControl.IApplicationControl.IApplicationControl"
+    name="absolute_url"
+    factory=".AbsoluteURL.ApplicationControlAbsoluteURL"
+    permission='Zope.Public'
+    allowed_interface=".AbsoluteURL.IAbsoluteURL" />
+    
+<browser:view
     name="object_name"
     factory=".ObjectName.ObjectNameView"
     permission='Zope.Public'