48 assert entity.eid == typed_eid(eid) |
48 assert entity.eid == typed_eid(eid) |
49 # the default behaviour is to fetch all unrelated entities and display |
49 # the default behaviour is to fetch all unrelated entities and display |
50 # them. Use fetch_order and not fetch_unrelated_order as sort method |
50 # them. Use fetch_order and not fetch_unrelated_order as sort method |
51 # since the latter is mainly there to select relevant items in the combo |
51 # since the latter is mainly there to select relevant items in the combo |
52 # box, it doesn't give interesting result in this context |
52 # box, it doesn't give interesting result in this context |
53 rql = entity.unrelated_rql(rtype, etype, role, |
53 rql, args = entity.unrelated_rql(rtype, etype, role, |
54 ordermethod='fetch_order', |
54 ordermethod='fetch_order', |
55 vocabconstraints=False) |
55 vocabconstraints=False) |
56 rset = self.req.execute(rql, {'x' : entity.eid}, 'x') |
56 rset = self.req.execute(rql, args, tuple(args)) |
57 return rset, 'list', "search-associate-content", True |
57 return rset, 'list', "search-associate-content", True |
58 |
58 |
59 |
59 |
60 class OutOfContextSearch(EntityView): |
60 class OutOfContextSearch(EntityView): |
61 id = 'outofcontext-search' |
61 id = 'outofcontext-search' |