# HG changeset patch # User Sylvain Thénault # Date 1297351283 -3600 # Node ID d2cd38749c17443ed55c07710dca8c86f92f0090 # Parent 12aa5cd81ce51fd5195ae5236d8502d025ea6678 [manage view] get etypes first to avoid xhtml validation error if no one found diff -r 12aa5cd81ce5 -r d2cd38749c17 web/views/startup.py --- a/web/views/startup.py Thu Feb 10 16:20:49 2011 +0100 +++ b/web/views/startup.py Thu Feb 10 16:21:23 2011 +0100 @@ -77,13 +77,14 @@ def entities(self): schema = self._cw.vreg.schema - self.w(u'
 
') - self.w(u'

%s

\n' % self._cw._('Browse by entity type')) - manager = self._cw.user.matching_groups('managers') - self.w(u'') - self.entity_types_table(eschema for eschema in schema.entities() - if uicfg.indexview_etype_section.get(eschema) == 'application') - self.w(u'
') + eschemas = [eschema for eschema in schema.entities() + if uicfg.indexview_etype_section.get(eschema) == 'application'] + if eschemas: + self.w(u'
 
') + self.w(u'

%s

\n' % self._cw._('Browse by entity type')) + self.w(u'') + self.entity_types_table(eschemas) + self.w(u'
') def entity_types_table(self, eschemas): infos = sorted(self.entity_types(eschemas),