[startup view] sort startup views by alphabetical order stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 17 May 2010 17:30:52 +0200
branchstable
changeset 5530 da21e3fbe240
parent 5529 7446f5807b33
child 5531 0ce62ac0d1d7
[startup view] sort startup views by alphabetical order
web/views/startup.py
--- a/web/views/startup.py	Mon May 17 17:30:28 2010 +0200
+++ b/web/views/startup.py	Mon May 17 17:30:52 2010 +0200
@@ -97,7 +97,8 @@
         self.startupviews_table()
 
     def startupviews_table(self):
-        for v in self._cw.vreg['views'].possible_views(self._cw, None):
+        views = self._cw.vreg['views'].possible_views(self._cw, None)
+        for v in sorted(views, key=lambda x: self._cw._(x.title)):
             if v.category != 'startupview' or v.__regid__ in ('index', 'tree', 'manage'):
                 continue
             self.w('<p><a href="%s">%s</a></p>' % (