equal
deleted
inserted
replaced
17 from logilab.common.compat import all |
17 from logilab.common.compat import all |
18 |
18 |
19 from rql import parse, nodes |
19 from rql import parse, nodes |
20 |
20 |
21 from cubicweb import Unauthorized, typed_eid |
21 from cubicweb import Unauthorized, typed_eid |
22 from cubicweb.selectors import match_context_prop, abstract_relation_possible |
22 from cubicweb.selectors import match_context_prop, partial_relation_possible |
23 from cubicweb.appobject import AppRsetObject |
23 from cubicweb.appobject import AppRsetObject |
24 from cubicweb.common.registerers import priority_registerer |
24 from cubicweb.common.registerers import priority_registerer |
25 from cubicweb.web.htmlwidgets import HTMLWidget |
25 from cubicweb.web.htmlwidgets import HTMLWidget |
26 |
26 |
27 ## rqlst manipulation functions used by facets ################################ |
27 ## rqlst manipulation functions used by facets ################################ |
331 except Unauthorized: |
331 except Unauthorized: |
332 return [] |
332 return [] |
333 |
333 |
334 |
334 |
335 class RelationFacet(VocabularyFacet): |
335 class RelationFacet(VocabularyFacet): |
336 __select__ = abstract_relation_possible() & match_context_prop() |
336 __select__ = partial_relation_possible() & match_context_prop() |
337 # class attributes to configure the rel ation facet |
337 # class attributes to configure the rel ation facet |
338 rtype = None |
338 rtype = None |
339 role = 'subject' |
339 role = 'subject' |
340 target_attr = 'eid' |
340 target_attr = 'eid' |
341 # set this to a stored procedure name if you want to sort on the result of |
341 # set this to a stored procedure name if you want to sort on the result of |