cubicweb/web/action.py
branch3.27
changeset 12869 50db521e3e53
parent 12833 c69421aece24
child 12900 2cc3f481ecd0
equal deleted inserted replaced
12867:50122959acbc 12869:50db521e3e53
    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
       
    36 
    35 
    37 from cubicweb import _
    36 from cubicweb import _
    38 
    37 
    39 from cubicweb import target
    38 from cubicweb import target
    40 from cubicweb.predicates import (partial_relation_possible, match_search_state,
    39 from cubicweb.predicates import (partial_relation_possible, match_search_state,
    47     request search state.
    46     request search state.
    48     """
    47     """
    49     __registry__ = 'actions'
    48     __registry__ = 'actions'
    50     __select__ = match_search_state('normal')
    49     __select__ = match_search_state('normal')
    51     order = 99
    50     order = 99
    52     category: Optional[str] = 'moreactions'
    51     category = 'moreactions'
    53     # actions in category 'moreactions' can specify a sub-menu in which they should be filed
    52     # actions in category 'moreactions' can specify a sub-menu in which they should be filed
    54     submenu = None
    53     submenu = None
    55 
    54 
    56     def actual_actions(self):
    55     def actual_actions(self):
    57         yield self
    56         yield self