equal
deleted
inserted
replaced
12 from cubicweb import role |
12 from cubicweb import role |
13 from cubicweb.utils import merge_dicts |
13 from cubicweb.utils import merge_dicts |
14 from cubicweb.view import View, Component |
14 from cubicweb.view import View, Component |
15 from cubicweb.selectors import ( |
15 from cubicweb.selectors import ( |
16 paginated_rset, one_line_rset, primary_view, match_context_prop, |
16 paginated_rset, one_line_rset, primary_view, match_context_prop, |
17 abstract_has_related_entities, abstract_relation_possible, |
17 partial_has_related_entities, partial_relation_possible, |
18 condition_compat, accepts_compat, has_relation_compat) |
18 condition_compat, accepts_compat, has_relation_compat) |
19 from cubicweb.common.registerers import accepts_registerer |
19 from cubicweb.common.registerers import accepts_registerer |
20 |
20 |
21 _ = unicode |
21 _ = unicode |
22 |
22 |
141 |
141 |
142 |
142 |
143 class RelatedObjectsVComponent(EntityVComponent): |
143 class RelatedObjectsVComponent(EntityVComponent): |
144 """a section to display some related entities""" |
144 """a section to display some related entities""" |
145 vid = 'list' |
145 vid = 'list' |
146 __select__ = abstract_relation_possible() & abstract_has_related_entities() |
146 __select__ = partial_relation_possible() & partial_has_related_entities() |
147 |
147 |
148 def rql(self): |
148 def rql(self): |
149 """override this method if you want to use a custom rql query""" |
149 """override this method if you want to use a custom rql query""" |
150 return None |
150 return None |
151 |
151 |