web/uicfg.py
branchstable
changeset 6901 118e78f6e4e4
parent 6827 e730b401f00e
child 6902 20f63f716f0e
equal deleted inserted replaced
6900:fcd4e6beec09 6901:118e78f6e4e4
    51 
    51 
    52 from cubicweb import neg_role
    52 from cubicweb import neg_role
    53 from cubicweb.rtags import (RelationTags, RelationTagsBool, RelationTagsSet,
    53 from cubicweb.rtags import (RelationTags, RelationTagsBool, RelationTagsSet,
    54                             RelationTagsDict, NoTargetRelationTagsDict,
    54                             RelationTagsDict, NoTargetRelationTagsDict,
    55                             register_rtag, _ensure_str_key)
    55                             register_rtag, _ensure_str_key)
    56 from cubicweb.schema import META_RTYPES
    56 from cubicweb.schema import META_RTYPES, INTERNAL_TYPES, WORKFLOW_TYPES
    57 
    57 
    58 
    58 
    59 # primary view configuration ##################################################
    59 # primary view configuration ##################################################
    60 
    60 
    61 def init_primaryview_section(rtag, sschema, rschema, oschema, role):
    61 def init_primaryview_section(rtag, sschema, rschema, oschema, role):
   118         for eschema in schema.entities():
   118         for eschema in schema.entities():
   119             if eschema.final:
   119             if eschema.final:
   120                 continue
   120                 continue
   121             if eschema.schema_entity():
   121             if eschema.schema_entity():
   122                 self.setdefault(eschema, 'schema')
   122                 self.setdefault(eschema, 'schema')
       
   123             elif eschema in INTERNAL_TYPES or eschema in WORKFLOW_TYPES:
       
   124                 self.setdefault(eschema, 'system')
   123             elif eschema.is_subobject(strict=True):
   125             elif eschema.is_subobject(strict=True):
   124                 self.setdefault(eschema, 'subobject')
   126                 self.setdefault(eschema, 'subobject')
   125             else:
   127             else:
   126                 self.setdefault(eschema, 'application')
   128                 self.setdefault(eschema, 'application')
   127 
   129 
   128 indexview_etype_section = InitializableDict(
   130 indexview_etype_section = InitializableDict(
   129     EmailAddress='subobject',
   131     EmailAddress='subobject',
       
   132     Bookmark='system',
   130     # entity types in the 'system' table by default (managers only)
   133     # entity types in the 'system' table by default (managers only)
   131     CWSource='system',
       
   132     CWUser='system', CWGroup='system',
   134     CWUser='system', CWGroup='system',
   133     CWPermission='system',
       
   134     CWCache='system',
       
   135     Workflow='system',
       
   136     ExternalUri='system',
       
   137     Bookmark='system',
       
   138     )
   135     )
   139 
   136 
   140 # autoform.AutomaticEntityForm configuration ##################################
   137 # autoform.AutomaticEntityForm configuration ##################################
   141 
   138 
   142 def _formsections_as_dict(formsections):
   139 def _formsections_as_dict(formsections):