diff options
author | Aaron Bentley <aaron.bentley@utoronto.ca> | 2006-01-25 20:37:55 -0500 |
---|---|---|
committer | Aaron Bentley <aaron.bentley@utoronto.ca> | 2006-01-25 20:37:55 -0500 |
commit | dcc900ada8cc7ccf99d54ed9ed55c74f4b9c2a29 (patch) | |
tree | 1fa198d35b0e493245c6213bd42261b06eedeb42 /beweb | |
parent | 81d4a023b5773516df0f0dfbb0c9e26656d0d32a (diff) | |
parent | 4eb3e0d84a15aabbf723fe9b3696dfc81efd9bb0 (diff) | |
download | bugseverywhere-dcc900ada8cc7ccf99d54ed9ed55c74f4b9c2a29.tar.gz |
Merge my changes
Diffstat (limited to 'beweb')
-rw-r--r-- | beweb/beweb/controllers.py | 6 | ||||
-rw-r--r-- | beweb/beweb/prest.py | 1 | ||||
-rw-r--r-- | beweb/beweb/templates/about.kid | 2 | ||||
-rw-r--r-- | beweb/beweb/templates/bugs.kid | 7 | ||||
-rw-r--r-- | beweb/beweb/templates/edit_bug.kid | 23 |
5 files changed, 29 insertions, 10 deletions
diff --git a/beweb/beweb/controllers.py b/beweb/beweb/controllers.py index b0f13db..cbd0816 100644 --- a/beweb/beweb/controllers.py +++ b/beweb/beweb/controllers.py @@ -84,10 +84,14 @@ class Bug(PrestHandler): raise cherrypy.HTTPRedirect(bug_url(bug_data['project'], bug.uuid)) @provide_action("action", "Update") - def update(self, bug_data, bug, status, severity, summary, action): + def update(self, bug_data, bug, status, severity, summary, assigned, + action): bug.status = status bug.severity = severity bug.summary = summary + if assigned == "": + assigned = None + bug.assigned = assigned bug.save() raise cherrypy.HTTPRedirect(bug_list_url(bug_data["project"])) diff --git a/beweb/beweb/prest.py b/beweb/beweb/prest.py index 7de1290..e6b7cdf 100644 --- a/beweb/beweb/prest.py +++ b/beweb/beweb/prest.py @@ -56,7 +56,6 @@ class PrestHandler(object): if action is not None: return action(*new_args, **kwargs) else: - print child.__class__.__name__ return child.dispatch(*new_args, **kwargs) def get_action(self, **kwargs): diff --git a/beweb/beweb/templates/about.kid b/beweb/beweb/templates/about.kid index 212bc1d..45d0093 100644 --- a/beweb/beweb/templates/about.kid +++ b/beweb/beweb/templates/about.kid @@ -12,7 +12,7 @@ Bentley and Oleg Romanyshyn. </p> <p> - Development was sponsored by + Development is sponsored by <a href="http://panoramicfeedback.com/">Panoramic Feedback</a>. </p> <p> diff --git a/beweb/beweb/templates/bugs.kid b/beweb/beweb/templates/bugs.kid index b8b2ff7..30004fc 100644 --- a/beweb/beweb/templates/bugs.kid +++ b/beweb/beweb/templates/bugs.kid @@ -2,8 +2,9 @@ <?python from libbe.cmdutil import unique_name from beweb.controllers import bug_url, project_url, bug_list_url +from beweb.config import people def row_class(bug): - if bug.status == "closed": + if not bug.active is True: return "closed" else: return "" @@ -19,8 +20,8 @@ def row_class(bug): <body> <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)}" py:if="bug.status != 'closed' or show_closed"><td><a href="${bug_url(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> +<tr><td>ID</td><td>Status</td><td>Severity</td><td>Assigned To</td><td>Comments</td><td>Summary</td></tr> +<div py:for="bug in bugs" py:strip="True"><tr class="${row_class(bug)}" py:if="bug.active or show_closed"><td><a href="${bug_url(project_id, bug.uuid)}">${unique_name(bug, bugs[:])}</a></td><td>${bug.status}</td><td>${bug.severity}</td><td>${people.get(bug.assigned, bug.assigned)}</td><td>${len(list(bug.iter_comment_ids()))}</td><td>${bug.summary}</td></tr> </div> </table> <a href="${project_url()}">Project list</a> diff --git a/beweb/beweb/templates/edit_bug.kid b/beweb/beweb/templates/edit_bug.kid index 49dbe52..89c4208 100644 --- a/beweb/beweb/templates/edit_bug.kid +++ b/beweb/beweb/templates/edit_bug.kid @@ -1,16 +1,30 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <?python -from libbe.bugdir import severity_levels +from libbe.bugdir import severity_levels, active_status, inactive_status from libbe.utility import time_to_str from beweb.controllers import bug_list_url, comment_url -def select_among(name, options, default): +from beweb.config import people +def select_among(name, options, default, display_names=None): output = ['<select name="%s">' % name] for option in options: if option == default: selected = ' selected="selected"' else: selected = "" - output.append("<option%s>%s</option>" % (selected, option)) + if display_names is None: + display_name = None + else: + display_name = display_names.get(option) + + if option is None: + option = "" + if display_name is None: + display_name = option + value = "" + else: + value = ' value="%s"' % option + output.append("<option%s%s>%s</option>" % (selected, value, + display_name)) output.append("</select>") return XML("".join(output)) ?> @@ -27,7 +41,8 @@ def select_among(name, options, default): <form method="post"> <table> <tr><td>Status</td><td>Severity</td><td>Assigned To</td><td>Summary</td></tr> -<tr><td>${select_among("status", ["open", "closed", "in-progress"], bug.status)}</td><td>${select_among("severity", severity_levels, bug.severity)}</td><td>${bug.assigned}</td><td><input name="summary" value="${bug.summary}" size="80" /></td></tr> +<tr><td>${select_among("status", active_status+inactive_status, bug.status)}</td><td>${select_among("severity", severity_levels, bug.severity)}</td> +<td>${select_among("assigned", people.keys()+[None], bug.assigned, people)}</td><td><input name="summary" value="${bug.summary}" size="80" /></td></tr> </table> <div py:for="comment in bug.list_comments()" class="comment"> <insetbox> |