diff options
author | Aaron Bentley <abentley@panoramicfeedback.com> | 2005-12-01 22:46:33 +0000 |
---|---|---|
committer | Aaron Bentley <abentley@panoramicfeedback.com> | 2005-12-01 22:46:33 +0000 |
commit | 278aa38c3aa37f94c9927b54349ae1b53b7a17c9 (patch) | |
tree | ab78e4a1023100f95bedeb6720dcb4c767bb3c5f | |
parent | 21b01aa7795d374fa2bebfdccb45526091be51c1 (diff) | |
download | bugseverywhere-278aa38c3aa37f94c9927b54349ae1b53b7a17c9.tar.gz |
More web UI tweaks
-rw-r--r-- | beweb/beweb/config.py | 3 | ||||
-rw-r--r-- | beweb/beweb/controllers.py | 5 | ||||
-rw-r--r-- | beweb/beweb/static/css/style.css | 5 | ||||
-rw-r--r-- | beweb/beweb/templates/bugs.kid | 3 | ||||
-rw-r--r-- | beweb/beweb/templates/projects.kid | 7 |
5 files changed, 14 insertions, 9 deletions
diff --git a/beweb/beweb/config.py b/beweb/beweb/config.py index 25cb01b..063b977 100644 --- a/beweb/beweb/config.py +++ b/beweb/beweb/config.py @@ -1,3 +1,4 @@ projects = {"be": ("Bugs Everywhere","/home/abentley/be"), - "devel": ("PF devel","/home/abentley/devel"), + "devel": ("PF Devel","/home/abentley/devel"), + "release": ("PF Release","/home/abentley/release"), } diff --git a/beweb/beweb/controllers.py b/beweb/beweb/controllers.py index 3111d2f..b8e2854 100644 --- a/beweb/beweb/controllers.py +++ b/beweb/beweb/controllers.py @@ -25,7 +25,9 @@ class Root(controllers.Root): @turbogears.expose(html="beweb.templates.bugs") - def bugs(self, project_id, sort_by=None): + def bugs(self, project_id, sort_by=None, show_closed=False): + if show_closed == "False": + show_closed = False bug_tree = project_tree(project_id) bugs = list(bug_tree.list()) if sort_by is None: @@ -36,6 +38,7 @@ class Root(controllers.Root): return {"project_id" : project_id, "project_name" : projects[project_id][0], "bugs" : bugs, + "show_closed" : show_closed, } @turbogears.expose(html="beweb.templates.edit_bug") diff --git a/beweb/beweb/static/css/style.css b/beweb/beweb/static/css/style.css index 9d9745e..6f43777 100644 --- a/beweb/beweb/static/css/style.css +++ b/beweb/beweb/static/css/style.css @@ -14,10 +14,7 @@ h1 margin-bottom:0; color: #990; } -tr.closed -{ - display: none -} + tr.closed td { background-color: #ccc; diff --git a/beweb/beweb/templates/bugs.kid b/beweb/beweb/templates/bugs.kid index 0001a77..ef89b0f 100644 --- a/beweb/beweb/templates/bugs.kid +++ b/beweb/beweb/templates/bugs.kid @@ -19,9 +19,10 @@ def row_class(bug): <h1>Bug list for ${project_name}</h1> <table> <tr><td>ID</td><td>Status</td><td>Severity</td><td>Assigned To</td><td>Summary</td></tr> -<div py:for="bug in bugs" py:strip="True"><tr class="${row_class(bug)}"><td><a href="${'/%s/%s' % (project_id, bug.uuid)}">${unique_name(bug, bugs[:])}</a></td><td>${bug.status}</td><td>${bug.severity}</td><td>${bug.assigned}</td><td>${bug.summary}</td></tr> +<div py:for="bug in bugs" py:strip="True"><tr class="${row_class(bug)}" py:if="bug.status != 'closed' or show_closed"><td><a href="${'/%s/%s/' % (project_id, bug.uuid)}">${unique_name(bug, bugs[:])}</a></td><td>${bug.status}</td><td>${bug.severity}</td><td>${bug.assigned}</td><td>${bug.summary}</td></tr> </div> </table> <a href="/">Project list</a> +<a href="${'/%s/?show_closed=%s' % (project_id, str(not show_closed))}">Toggle closed</a> </body> </html> diff --git a/beweb/beweb/templates/projects.kid b/beweb/beweb/templates/projects.kid index 14199cb..21b2777 100644 --- a/beweb/beweb/templates/projects.kid +++ b/beweb/beweb/templates/projects.kid @@ -14,7 +14,10 @@ def select_among(name, options, default): ?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="'master.kid'"> - +<?python +project_triples = [(pn, pid, pl) for pid,(pn, pl) in projects.iteritems()] +project_triples.sort() +?> <head> <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> <title>Project List</title> @@ -23,7 +26,7 @@ def select_among(name, options, default): <body> <h1>Project List</h1> <table> -<tr py:for="project_id,(project_name, project_loc) in projects.iteritems()"><td><a href="/${project_id}/">${project_name}</a></td></tr> +<tr py:for="project_name, project_id, project_loc in project_triples"><td><a href="/${project_id}/">${project_name}</a></td></tr> </table> </body> </html> |