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