diff options
Diffstat (limited to 'interfaces/web')
-rw-r--r-- | interfaces/web/templates/empty-list.html | 11 | ||||
-rw-r--r-- | interfaces/web/web.py | 7 |
2 files changed, 16 insertions, 2 deletions
diff --git a/interfaces/web/templates/empty-list.html b/interfaces/web/templates/empty-list.html new file mode 100644 index 0000000..4c01cb2 --- /dev/null +++ b/interfaces/web/templates/empty-list.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} + +{% block page_title %} + {{ label }} +{% endblock %} + +{% block content %} + <p> + No matching bugs. + </p> +{% endblock %} 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'], |