should be enough. Nicer isn't it?
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 24 Jul 2009 15:28:03 +0200
changeset 2488 cd007fc4f2ea
parent 2487 c4c13cf8cd7b
child 2489 37a747ad6fd4
child 2490 b0771c03f531
should be enough. Nicer isn't it?
web/views/startup.py
--- a/web/views/startup.py	Fri Jul 24 15:20:14 2009 +0200
+++ b/web/views/startup.py	Fri Jul 24 15:28:03 2009 +0200
@@ -135,12 +135,7 @@
             etype = eschema.type
             label = display_name(req, etype, 'plural')
             nb = req.execute('Any COUNT(X) WHERE X is %s' % etype)[0][0]
-            if nb > 1:
-                view = self.vreg.select('views', 'list', req,
-                                        rset=req.etype_rset(etype))
-                url = view.url()
-            else:
-                url = self.build_url('view', rql='%s X' % etype)
+            url = self.build_url(etype)
             etypelink = u'&nbsp;<a href="%s">%s</a> (%d)' % (
                 xml_escape(url), label, nb)
             yield (label, etypelink, self.add_entity_link(eschema, req))