28 from cubicweb.appobject import objectify_selector |
28 from cubicweb.appobject import objectify_selector |
29 from cubicweb.selectors import (EntitySelector, yes, |
29 from cubicweb.selectors import (EntitySelector, yes, |
30 one_line_rset, multi_lines_rset, one_etype_rset, relation_possible, |
30 one_line_rset, multi_lines_rset, one_etype_rset, relation_possible, |
31 nonempty_rset, non_final_entity, |
31 nonempty_rset, non_final_entity, |
32 authenticated_user, match_user_groups, match_search_state, |
32 authenticated_user, match_user_groups, match_search_state, |
33 has_permission, has_add_permission, implements, debug_mode, |
33 has_permission, has_add_permission, is_instance, debug_mode, |
34 ) |
34 ) |
35 from cubicweb.web import uicfg, controller, action |
35 from cubicweb.web import uicfg, controller, action |
36 from cubicweb.web.views import linksearch_select_url, vid_from_rset |
36 from cubicweb.web.views import linksearch_select_url, vid_from_rset |
37 |
37 |
38 |
38 |
321 |
321 |
322 class ViewSameCWEType(action.Action): |
322 class ViewSameCWEType(action.Action): |
323 """when displaying the schema of a CWEType, offer to list entities of that type |
323 """when displaying the schema of a CWEType, offer to list entities of that type |
324 """ |
324 """ |
325 __regid__ = 'entitiesoftype' |
325 __regid__ = 'entitiesoftype' |
326 __select__ = one_line_rset() & implements('CWEType') |
326 __select__ = one_line_rset() & is_instance('CWEType') |
327 category = 'mainactions' |
327 category = 'mainactions' |
328 order = 40 |
328 order = 40 |
329 |
329 |
330 @property |
330 @property |
331 def etype(self): |
331 def etype(self): |