don't show folder section on index page when there is now folder yet
authorSylvain Thenault <sylvain.thenault@logilab.fr>
Mon, 05 Jan 2009 17:05:38 +0100
changeset 329 903eb8c4ebd6
parent 328 02abf429dd91
child 330 705866d6eee8
child 335 643db91242b1
don't show folder section on index page when there is now folder yet
web/views/startup.py
--- a/web/views/startup.py	Mon Jan 05 16:56:48 2009 +0100
+++ b/web/views/startup.py	Mon Jan 05 17:05:38 2009 +0100
@@ -146,7 +146,7 @@
     title = _('index')
     
     def display_folders(self):
-        return 'Folder' in self.schema
+        return 'Folder' in self.schema and self.req.execute('Any COUNT(X) WHERE X is Folder')[0][0]