web/action.py
branchtls-sprint
changeset 1432 2c3711d4570b
parent 838 f2c56312b03a
child 1433 091ac3ba5d51
equal deleted inserted replaced
1426:379261551578 1432:2c3711d4570b
     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')),