equal
deleted
inserted
replaced
94 set_classes(options) |
94 set_classes(options) |
95 return [nodes.reference(rawtext, utils.unescape(rest), refuri=ref, |
95 return [nodes.reference(rawtext, utils.unescape(rest), refuri=ref, |
96 **options)], [] |
96 **options)], [] |
97 |
97 |
98 def rql_role(role, rawtext, text, lineno, inliner, options={}, content=[]): |
98 def rql_role(role, rawtext, text, lineno, inliner, options={}, content=[]): |
99 """:rql:`Any X,Y WHERE X is CWUser, X login Y:table`""" |
99 """:rql:`<rql-expr>` or :rql:`<rql-expr>:<vid>` |
|
100 |
|
101 Example: :rql:`Any X,Y WHERE X is CWUser, X login Y:table` |
|
102 |
|
103 Replace the directive with the output of applying the view to the resultset |
|
104 returned by the query. |
|
105 |
|
106 "X eid %(userid)s" can be used in the RQL query for this query will be |
|
107 executed with the argument {'userid': _cw.user.eid}. |
|
108 """ |
100 _cw = inliner.document.settings.context._cw |
109 _cw = inliner.document.settings.context._cw |
101 text = text.strip() |
110 text = text.strip() |
102 if ':' in text: |
111 if ':' in text: |
103 rql, vid = text.rsplit(u':', 1) |
112 rql, vid = text.rsplit(u':', 1) |
104 rql = rql.strip() |
113 rql = rql.strip() |