From: W. Trevor King Date: Mon, 17 Sep 2012 13:25:07 +0000 (-0400) Subject: command.html: display "Target:" detail for bugs with targets. X-Git-Tag: 1.1.0~75 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=99373a9f5abc16e4eae021b0feaf33a1d26ce476;p=be.git command.html: display "Target:" detail for bugs with targets. --- diff --git a/libbe/command/html.py b/libbe/command/html.py index eaf5f1d..88761fe 100644 --- a/libbe/command/html.py +++ b/libbe/command/html.py @@ -34,6 +34,7 @@ from jinja2 import Environment, FileSystemLoader, DictLoader, ChoiceLoader import libbe import libbe.command import libbe.command.depend +import libbe.command.target import libbe.command.util import libbe.comment import libbe.util.encoding @@ -146,6 +147,9 @@ class ServerApp (libbe.util.wsgi.WSGI_AppObject, index_type = 'active' else: index_type = 'inactive' + target = libbe.command.target.bug_target(self.bugdirs, bug) + if target == bug: # e.g. when bug.severity == 'target' + target = None up_link = '../../{}?type={}'.format(self._index_file, index_type) bug.load_comments(load_full=True) bug.comment_root.sort(cmp=libbe.comment.cmp_time, reverse=True) @@ -159,10 +163,12 @@ class ServerApp (libbe.util.wsgi.WSGI_AppObject, 'index_type': index_type.capitalize(), 'index_file': self._index_file, 'bug': bug, + 'target': target, 'comment_entry': self.template.get_template( 'bug_comment_entry.html'), 'comments': [(depth,comment) for depth,comment in bug.comment_root.thread(flatten=False)], + 'bug_dir': self.bug_dir, 'comment_dir': self._truncated_comment_id, 'format_body': self._format_comment_body, 'div_close': _DivCloser(), @@ -677,6 +683,10 @@ div.root.comment { {{ strip_email(bug.creator or '')|e }} Created : {{ (bug.time_string or '')|e }} +{% if target %} + Target : + {{ target.summary }} +{% endif %} Summary : {{ bug.summary|e }}