web/views/startup.py
branchtls-sprint
changeset 1739 78b0819162a8
parent 1723 30c3a713ab61
child 1977 606923dff11b
equal deleted inserted replaced
1738:2cfd50c8a415 1739:78b0819162a8
    25 
    25 
    26     @classmethod
    26     @classmethod
    27     def vreg_initialization_completed(cls):
    27     def vreg_initialization_completed(cls):
    28         for eschema in cls.schema.entities():
    28         for eschema in cls.schema.entities():
    29             if eschema.schema_entity():
    29             if eschema.schema_entity():
    30                 uicfg.etypecat.setdefault(eschema, 'schema')
    30                 uicfg.indexview_etype_section.setdefault(eschema, 'schema')
    31             elif eschema.is_subobject(strict=True):
    31             elif eschema.is_subobject(strict=True):
    32                 uicfg.etypecat.setdefault(eschema, 'subobject')
    32                 uicfg.indexview_etype_section.setdefault(eschema, 'subobject')
    33             elif eschema.meta:
    33             elif eschema.meta:
    34                 uicfg.etypecat.setdefault(eschema, 'system')
    34                 uicfg.indexview_etype_section.setdefault(eschema, 'system')
    35             else:
    35             else:
    36                 uicfg.etypecat.setdefault(eschema, 'application')
    36                 uicfg.indexview_etype_section.setdefault(eschema, 'application')
    37 
    37 
    38     def display_folders(self):
    38     def display_folders(self):
    39         return False
    39         return False
    40 
    40 
    41     def call(self, **kwargs):
    41     def call(self, **kwargs):
    98         manager = self.req.user.matching_groups('managers')
    98         manager = self.req.user.matching_groups('managers')
    99         self.w(u'<table class="startup">')
    99         self.w(u'<table class="startup">')
   100         if manager:
   100         if manager:
   101             self.w(u'<tr><th colspan="4">%s</th></tr>\n' % self.req._('application entities'))
   101             self.w(u'<tr><th colspan="4">%s</th></tr>\n' % self.req._('application entities'))
   102         self.entity_types_table(eschema for eschema in schema.entities()
   102         self.entity_types_table(eschema for eschema in schema.entities()
   103                                 if uicfg.etypecat.get(eschema) == 'application')
   103                                 if uicfg.indexview_etype_section.get(eschema) == 'application')
   104         if manager:
   104         if manager:
   105             self.w(u'<tr><th colspan="4">%s</th></tr>\n' % self.req._('system entities'))
   105             self.w(u'<tr><th colspan="4">%s</th></tr>\n' % self.req._('system entities'))
   106             self.entity_types_table(eschema for eschema in schema.entities()
   106             self.entity_types_table(eschema for eschema in schema.entities()
   107                                 if uicfg.etypecat.get(eschema) == 'system')
   107                                 if uicfg.indexview_etype_section.get(eschema) == 'system')
   108             if 'CWAttribute' in schema: # check schema support
   108             if 'CWAttribute' in schema: # check schema support
   109                 self.w(u'<tr><th colspan="4">%s</th></tr>\n' % self.req._('schema entities'))
   109                 self.w(u'<tr><th colspan="4">%s</th></tr>\n' % self.req._('schema entities'))
   110                 self.entity_types_table(eschema for eschema in schema.entities()
   110                 self.entity_types_table(eschema for eschema in schema.entities()
   111                                         if uicfg.etypecat.get(eschema) == 'schema')
   111                                         if uicfg.indexview_etype_section.get(eschema) == 'schema')
   112         self.w(u'</table>')
   112         self.w(u'</table>')
   113 
   113 
   114     def entity_types_table(self, eschemas):
   114     def entity_types_table(self, eschemas):
   115         newline = 0
   115         newline = 0
   116         infos = sorted(self.entity_types(eschemas),
   116         infos = sorted(self.entity_types(eschemas),