cubicweb/web/action.py
changeset 12833 c69421aece24
parent 11767 432f87a63057
child 12869 50db521e3e53
equal deleted inserted replaced
12832:7d3299d6e655 12833:c69421aece24
    30 special view (with `self._cw.build_url(...)` for instance) 
    30 special view (with `self._cw.build_url(...)` for instance) 
    31 
    31 
    32 Many examples are available in :mod:`cubicweb.web.views.actions`.
    32 Many examples are available in :mod:`cubicweb.web.views.actions`.
    33 """
    33 """
    34 
    34 
       
    35 from typing import Optional
    35 
    36 
    36 from cubicweb import _
    37 from cubicweb import _
    37 
    38 
    38 from cubicweb import target
    39 from cubicweb import target
    39 from cubicweb.predicates import (partial_relation_possible, match_search_state,
    40 from cubicweb.predicates import (partial_relation_possible, match_search_state,
    46     request search state.
    47     request search state.
    47     """
    48     """
    48     __registry__ = 'actions'
    49     __registry__ = 'actions'
    49     __select__ = match_search_state('normal')
    50     __select__ = match_search_state('normal')
    50     order = 99
    51     order = 99
    51     category = 'moreactions'
    52     category: Optional[str] = 'moreactions'
    52     # actions in category 'moreactions' can specify a sub-menu in which they should be filed
    53     # actions in category 'moreactions' can specify a sub-menu in which they should be filed
    53     submenu = None
    54     submenu = None
    54 
    55 
    55     def actual_actions(self):
    56     def actual_actions(self):
    56         yield self
    57         yield self