21 |
21 |
22 __docformat__ = "restructuredtext en" |
22 __docformat__ = "restructuredtext en" |
23 from cubicweb import _ |
23 from cubicweb import _ |
24 |
24 |
25 from warnings import warn |
25 from warnings import warn |
|
26 |
|
27 from six import add_metaclass |
26 |
28 |
27 from logilab.common.deprecation import class_deprecated, class_renamed, deprecated |
29 from logilab.common.deprecation import class_deprecated, class_renamed, deprecated |
28 from logilab.mtconverter import xml_escape |
30 from logilab.mtconverter import xml_escape |
29 |
31 |
30 from cubicweb import Unauthorized, role, target, tags |
32 from cubicweb import Unauthorized, role, target, tags |
675 self._cw.view(self.vid, rset, w=w) |
677 self._cw.view(self.vid, rset, w=w) |
676 |
678 |
677 |
679 |
678 # old contextual components, deprecated ######################################## |
680 # old contextual components, deprecated ######################################## |
679 |
681 |
|
682 @add_metaclass(class_deprecated) |
680 class EntityVComponent(Component): |
683 class EntityVComponent(Component): |
681 """abstract base class for additinal components displayed in content |
684 """abstract base class for additinal components displayed in content |
682 headers and footer according to: |
685 headers and footer according to: |
683 |
686 |
684 * the displayed entity's type |
687 * the displayed entity's type |
685 * a context (currently 'header' or 'footer') |
688 * a context (currently 'header' or 'footer') |
686 |
689 |
687 it should be configured using .accepts, .etype, .rtype, .target and |
690 it should be configured using .accepts, .etype, .rtype, .target and |
688 .context class attributes |
691 .context class attributes |
689 """ |
692 """ |
690 __metaclass__ = class_deprecated |
|
691 __deprecation_warning__ = '[3.10] *VComponent classes are deprecated, use *CtxComponent instead (%(cls)s)' |
693 __deprecation_warning__ = '[3.10] *VComponent classes are deprecated, use *CtxComponent instead (%(cls)s)' |
692 |
694 |
693 __registry__ = 'ctxcomponents' |
695 __registry__ = 'ctxcomponents' |
694 __select__ = one_line_rset() |
696 __select__ = one_line_rset() |
695 |
697 |