web/views/actions.py
branchstable
changeset 1829 f54710fcdd62
parent 1551 a41c1c0a9e13
child 1977 606923dff11b
equal deleted inserted replaced
1828:e9e8beb06f01 1829:f54710fcdd62
     7 __docformat__ = "restructuredtext en"
     7 __docformat__ = "restructuredtext en"
     8 
     8 
     9 from cubicweb.vregistry import objectify_selector
     9 from cubicweb.vregistry import objectify_selector
    10 from cubicweb.selectors import (EntitySelector,
    10 from cubicweb.selectors import (EntitySelector,
    11     one_line_rset, two_lines_rset, one_etype_rset, relation_possible,
    11     one_line_rset, two_lines_rset, one_etype_rset, relation_possible,
    12     non_final_entity,
    12     nonempty_rset, non_final_entity,
    13     authenticated_user, match_user_groups, match_search_state,
    13     authenticated_user, match_user_groups, match_search_state,
    14     has_permission, has_add_permission,
    14     has_permission, has_add_permission,
    15     )
    15     )
    16 from cubicweb.web.action import Action
    16 from cubicweb.web.action import Action
    17 from cubicweb.web.views import linksearch_select_url, vid_from_rset
    17 from cubicweb.web.views import linksearch_select_url, vid_from_rset
    72     """base class for link search actions. By default apply on
    72     """base class for link search actions. By default apply on
    73     any size entity result search it the current state is 'linksearch'
    73     any size entity result search it the current state is 'linksearch'
    74     if accept match.
    74     if accept match.
    75     """
    75     """
    76     id = 'select'
    76     id = 'select'
    77     __select__ = match_search_state('linksearch') & match_searched_etype()
    77     __select__ = match_search_state('linksearch') & nonempty_rset() & match_searched_etype()
    78 
    78 
    79     title = _('select')
    79     title = _('select')
    80     category = 'mainactions'
    80     category = 'mainactions'
    81     order = 0
    81     order = 0
    82 
    82