web/views/schema.py
branchtls-sprint
changeset 1151 b20677336ee6
parent 1132 96752791c2b6
child 1153 6a7636b32a97
equal deleted inserted replaced
1150:2d1b721fded9 1151:b20677336ee6
    16 from cubicweb.view import EntityView, StartupView
    16 from cubicweb.view import EntityView, StartupView
    17 from cubicweb.common.uilib import ureport_as_html
    17 from cubicweb.common.uilib import ureport_as_html
    18 from cubicweb.web.action import Action
    18 from cubicweb.web.action import Action
    19 from cubicweb.web.views import baseviews
    19 from cubicweb.web.views import baseviews
    20 from cubicweb.web.views import TmpFileViewMixin
    20 from cubicweb.web.views import TmpFileViewMixin
       
    21 from cubicweb.web.views.editform import AutomaticEntityForm
       
    22 from cubicweb.web.views.boxes import EditBox
       
    23 
       
    24 
       
    25 AutomaticEntityForm.rcategories.set_rtag('primary', 'require_group', 'subject', 'EPermission')
       
    26 AutomaticEntityForm.rcategories.set_rtag('generated', 'final', 'subject', 'EEtype')
       
    27 AutomaticEntityForm.rcategories.set_rtag('generated', 'final', 'subject', 'ERtype')
       
    28 AutomaticEntityForm.rinlined.set_rtag(True, 'relation_type', 'subject', 'ENFRDef')
       
    29 AutomaticEntityForm.rinlined.set_rtag(True, 'from_entity', 'subject', 'ENFRDef')
       
    30 AutomaticEntityForm.rinlined.set_rtag(True, 'to_entity', 'subject', 'ENFRDef')
       
    31 AutomaticEntityForm.rwidgets.set_rtag('StringWidget', 'expression', 'subject', 'RQLExpression')
       
    32 
       
    33 EditBox.rmode.set_rtag('create', 'state_of', 'object', 'EEType')
       
    34 EditBox.rmode.set_rtag('create', 'transition_of', 'object', 'EEType')
       
    35 EditBox.rmode.set_rtag('create', 'relation_type', 'object', 'ERType')
       
    36 EditBox.rmode.set_rtag('link', 'from_entity', 'object', 'EEType')
       
    37 EditBox.rmode.set_rtag('link', 'to_entity', 'object', 'EEType')
    21 
    38 
    22 
    39 
    23 class ViewSchemaAction(Action):
    40 class ViewSchemaAction(Action):
    24     id = 'schema'
    41     id = 'schema'
    25     __select__ = yes()
    42     __select__ = yes()