web/views/basetemplates.py
changeset 3503 06bced8edddf
parent 3460 e4843535db25
parent 3498 838ef1f527ab
child 3655 af86ab65a282
--- a/web/views/basetemplates.py	Sat Sep 26 11:44:35 2009 +0200
+++ b/web/views/basetemplates.py	Mon Sep 28 12:37:01 2009 +0200
@@ -424,14 +424,13 @@
     def call(self, **kwargs):
         req = self._cw
         self.w(u'<div class="footer">')
-        # XXX Take object from the registry if in there? would be
-        #     better anyway
-        from cubicweb.web.views.wdoc import ChangeLogView
-        self.w(u'<a href="%s">%s</a> | ' % (req.build_url('changelog'),
-                                            req._(ChangeLogView.title).lower()))
-        self.w(u'<a href="%s">%s</a> | ' % (req.build_url('doc/about'),
-                                            req._('about this site')))
-        self.w(u'<a href="http://www.cubicweb.org">%s</a>' % req._('powered by CubicWeb'))
+        actions = self.vreg['actions'].possible_actions(self.req, rset=self.rset)
+        footeractions = actions.get('footer', ())
+        for i, action in enumerate(footeractions):
+            self.w(u'<a href="%s">%s</a>' % (action.url(),
+                                             self.req._(action.title)))
+            if i < (len(footeractions) - 1):
+                self.w(u' | ')
         self.w(u'</div>')
 
 
@@ -528,8 +527,3 @@
     if config.get('https-url'):
         return req.url().replace(req.base_url(), config['https-url'])
     return req.url()
-
-
-## vregistry registration callback ############################################
-def registration_callback(vreg):
-    vreg.register_all(globals().values(), __name__)