[ui component] restore see_also component
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 12 Oct 2010 22:15:47 +0200
changeset 6462 9586590060d4
parent 6461 b546296227ff
child 6463 67b0ad068f5d
[ui component] restore see_also component
web/views/basecomponents.py
--- a/web/views/basecomponents.py	Tue Oct 12 22:12:50 2010 +0200
+++ b/web/views/basecomponents.py	Tue Oct 12 22:15:47 2010 +0200
@@ -250,16 +250,18 @@
 
 # contextual components ########################################################
 
-# class SeeAlsoVComponent(component.RelatedObjectsVComponent):
-#     """display any entity's see also"""
-#     __regid__ = 'seealso'
-#     context = 'navcontentbottom'
-#     rtype = 'see_also'
-#     role = 'subject'
-#     order = 40
-#     # register msg not generated since no entity use see_also in cubicweb itself
-#     title = _('ctxcomponents_seealso')
-#     help = _('ctxcomponents_seealso_description')
+class SeeAlsoComponent(component.RelatedObjectsCtxComponent):
+    """display any entity's see also"""
+    __regid__ = 'seealso'
+    context = 'navcontentbottom'
+    rtype = 'see_also'
+    role = 'subject'
+    order = 40
+    title = _('see_also')
+    # register msg not generated since no entity use see_also in cubicweb itself
+    _('ctxcomponents_seealso')
+    _('ctxcomponents_seealso_description')
+
 
 
 class MetaDataComponent(component.EntityCtxComponent):
@@ -287,7 +289,7 @@
             w(u'</div>\n')
 
 
-# def registration_callback(vreg):
-#     vreg.register_all(globals().values(), __name__, (SeeAlsoVComponent,))
-#     if 'see_also' in vreg.schema:
-#         vreg.register(SeeAlsoVComponent)
+def registration_callback(vreg):
+    vreg.register_all(globals().values(), __name__, (SeeAlsoComponent,))
+    if 'see_also' in vreg.schema:
+        vreg.register(SeeAlsoComponent)