diff options
author | W. Trevor King <wking@drexel.edu> | 2010-07-15 07:30:44 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2010-07-15 07:30:44 -0400 |
commit | a3ba0080f721597bc61391c4135b3763eb548ecb (patch) | |
tree | be2da8ab7b2e4c2494e2939cf3827ddda0c2dc56 /interfaces/web/web.py | |
parent | 4377a7a3e0532ec2040ec06f250a4124f24cea0d (diff) | |
download | bugseverywhere-a3ba0080f721597bc61391c4135b3763eb548ecb.tar.gz |
Fixed #bea/0a2# : Humanize empty result pages.
Added a special template for empty bug lists:
interfaces/web/templates/empty-list.html
Diffstat (limited to 'interfaces/web/web.py')
-rw-r--r-- | interfaces/web/web.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/interfaces/web/web.py b/interfaces/web/web.py index 75a430d..d910420 100644 --- a/interfaces/web/web.py +++ b/interfaces/web/web.py @@ -94,9 +94,12 @@ class WebInterface: label += ' Currently Unschdeuled' if target == 'None' \ else ' Scheduled for %s' % (target,) - template = self.env.get_template('list.html') bugs = self.filter_bugs(status, assignee, target) - + if len(bugs) == 0: + template = self.env.get_template('empty-list.html') + else: + template = self.env.get_template('list.html') + common_info = self.get_common_information() return template.render(bugs=bugs, bd=self.bd, label=label, assignees=common_info['possible_assignees'], |