diff bitten/trac_ext/web_ui.py @ 209:d2b9c72e9643

Hide deactivated build configurations on the build status page by default, and provide an option panel to make them visible.
author cmlenz
date Mon, 19 Sep 2005 23:41:22 +0000
parents e6ddca1e5712
children 25f84dd9f159
line wrap: on
line diff
--- a/bitten/trac_ext/web_ui.py
+++ b/bitten/trac_ext/web_ui.py
@@ -289,14 +289,20 @@
 
     def _render_overview(self, req):
         req.hdf['title'] = 'Build Status'
-        configurations = BuildConfig.select(self.env, include_inactive=True)
+        show_all = False
+        if req.args.get('show') == 'all':
+            show_all = True
+        req.hdf['config.show_all'] = show_all
+
+        configurations = BuildConfig.select(self.env, include_inactive=show_all)
         for idx, config in enumerate(configurations):
             description = config.description
             if description:
                 description = wiki_to_html(description, self.env, req)
             req.hdf['configs.%d' % idx] = {
                 'name': config.name, 'label': config.label or config.name,
-                'path': config.path, 'description': description,
+                'active': config.active, 'path': config.path,
+                'description': description,
                 'href': self.env.href.build(config.name),
             }
         req.hdf['page.mode'] = 'overview'
Copyright (C) 2012-2017 Edgewall Software