[see also component] drop it, we can acheive the same result with uicfg rules
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 13 Oct 2010 16:17:20 +0200
changeset 6477 a91f3541b3dd
parent 6476 de7f53cf75ec
child 6478 8098e1295cf0
[see also component] drop it, we can acheive the same result with uicfg rules
web/views/basecomponents.py
--- a/web/views/basecomponents.py	Wed Oct 13 16:16:48 2010 +0200
+++ b/web/views/basecomponents.py	Wed Oct 13 16:17:20 2010 +0200
@@ -250,19 +250,6 @@
 
 # contextual components ########################################################
 
-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):
     __regid__ = 'metadata'
@@ -287,10 +274,3 @@
                 view.render_title(wow)
             view.render_body(w)
             w(u'</div>\n')
-
-
-def registration_callback(vreg):
-    vreg.register_all(globals().values(), __name__, (SeeAlsoComponent,))
-    if 'see_also' in vreg.schema:
-        vreg.register(SeeAlsoComponent)
-        uicfg.primaryview_section.tag_subject_of(('*', 'see_also', '*'), 'hidden')