9 from cubicweb import role, target |
9 from cubicweb import role, target |
10 from cubicweb.selectors import (relation_possible, match_search_state, |
10 from cubicweb.selectors import (relation_possible, match_search_state, |
11 one_line_rset, may_add_relation, yes, |
11 one_line_rset, may_add_relation, yes, |
12 accepts_compat, condition_compat, deprecate) |
12 accepts_compat, condition_compat, deprecate) |
13 from cubicweb.common.appobject import AppRsetObject |
13 from cubicweb.common.appobject import AppRsetObject |
14 from cubicweb.common.registerers import action_registerer |
14 from cubicweb.common.registerers import accepts_registerer |
15 |
15 |
16 _ = unicode |
16 _ = unicode |
17 |
17 |
18 |
18 |
19 class Action(AppRsetObject): |
19 class Action(AppRsetObject): |
20 """abstract action. Handle the .search_states attribute to match |
20 """abstract action. Handle the .search_states attribute to match |
21 request search state. |
21 request search state. |
22 """ |
22 """ |
23 __registry__ = 'actions' |
23 __registry__ = 'actions' |
24 __registerer__ = action_registerer |
24 __registerer__ = accepts_registerer |
25 __selectors__ = (yes,) |
25 __selectors__ = (yes,) |
26 |
26 |
27 property_defs = { |
27 property_defs = { |
28 'visible': dict(type='Boolean', default=True, |
28 'visible': dict(type='Boolean', default=True, |
29 help=_('display the action or not')), |
29 help=_('display the action or not')), |