75 xml_escape(v.url()), xml_escape(self._cw._(v.title).capitalize()))) |
75 xml_escape(v.url()), xml_escape(self._cw._(v.title).capitalize()))) |
76 self.w(u'</ul>') |
76 self.w(u'</ul>') |
77 |
77 |
78 def entities(self): |
78 def entities(self): |
79 schema = self._cw.vreg.schema |
79 schema = self._cw.vreg.schema |
80 self.w(u'<div class="hr"> </div>') |
80 eschemas = [eschema for eschema in schema.entities() |
81 self.w(u'<h2>%s</h2>\n' % self._cw._('Browse by entity type')) |
81 if uicfg.indexview_etype_section.get(eschema) == 'application'] |
82 manager = self._cw.user.matching_groups('managers') |
82 if eschemas: |
83 self.w(u'<table class="startup">') |
83 self.w(u'<div class="hr"> </div>') |
84 self.entity_types_table(eschema for eschema in schema.entities() |
84 self.w(u'<h2>%s</h2>\n' % self._cw._('Browse by entity type')) |
85 if uicfg.indexview_etype_section.get(eschema) == 'application') |
85 self.w(u'<table class="startup">') |
86 self.w(u'</table>') |
86 self.entity_types_table(eschemas) |
|
87 self.w(u'</table>') |
87 |
88 |
88 def entity_types_table(self, eschemas): |
89 def entity_types_table(self, eschemas): |
89 infos = sorted(self.entity_types(eschemas), |
90 infos = sorted(self.entity_types(eschemas), |
90 key=lambda (l,a,e): unormalize(l)) |
91 key=lambda (l,a,e): unormalize(l)) |
91 q, r = divmod(len(infos), 2) |
92 q, r = divmod(len(infos), 2) |