diff -r 41aadba8b29f -r 8370be19afd7 web/views/startup.py --- a/web/views/startup.py Mon May 04 10:50:10 2009 +0200 +++ b/web/views/startup.py Mon May 04 10:50:25 2009 +0200 @@ -6,23 +6,34 @@ :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr """ __docformat__ = "restructuredtext en" +_ = unicode from logilab.common.textutils import unormalize from logilab.mtconverter import html_escape -from cubicweb.common.uilib import ureport_as_html, ajax_replace_url from cubicweb.view import StartupView from cubicweb.selectors import match_user_groups -from cubicweb.web.httpcache import EtagHTTPCacheManager +from cubicweb.common.uilib import ureport_as_html, ajax_replace_url +from cubicweb.web import uicfg, httpcache from cubicweb.web.views.management import SecurityViewMixIn -from copy import deepcopy -_ = unicode class ManageView(StartupView): id = 'manage' title = _('manage') - http_cache_manager = EtagHTTPCacheManager + http_cache_manager = httpcache.EtagHTTPCacheManager + + @classmethod + def vreg_initialization_completed(cls): + for eschema in cls.schema.entities(): + if eschema.schema_entity(): + uicfg.etypecat.setdefault(eschema, 'schema') + elif eschema.is_subobject(strict=True): + uicfg.etypecat.setdefault(eschema, 'subobject') + elif eschema.meta: + uicfg.etypecat.setdefault(eschema, 'system') + else: + uicfg.etypecat.setdefault(eschema, 'application') def display_folders(self): return False @@ -89,15 +100,15 @@ if manager: self.w(u'