Add user email addresses to the change view
This commit adds the email addresses for the patch owner and the current reviewers to the change view. Change-Id: I9c6835746d50d6907c490bc62323a07cd8eff789
This commit is contained in:
parent
27f90d0b73
commit
76c8344c8d
@ -405,10 +405,18 @@ class ChangeMessageBox(mywid.HyperText):
|
||||
if message.author.username == self.app.config.username:
|
||||
name_style = 'change-message-own-name'
|
||||
header_style = 'change-message-own-header'
|
||||
reviewer_string = message.author.name
|
||||
else:
|
||||
name_style = 'change-message-name'
|
||||
header_style = 'change-message-header'
|
||||
text = [(name_style, message.author_name),
|
||||
if message.author.email:
|
||||
reviewer_string = "%s <%s>" % (
|
||||
message.author.name,
|
||||
message.author.email)
|
||||
else:
|
||||
reviewer_string = message.author.name
|
||||
|
||||
text = [(name_style, reviewer_string),
|
||||
(header_style, ': '+lines.pop(0)),
|
||||
(header_style,
|
||||
created.strftime(' (%Y-%m-%d %H:%M:%S%z)'))]
|
||||
@ -640,7 +648,12 @@ class ChangeView(urwid.WidgetWrap):
|
||||
self.owner_email = None
|
||||
|
||||
self.change_id_label.text.set_text(('change-data', change.change_id))
|
||||
self.owner_label.text.set_text(('change-data', change.owner_name))
|
||||
if change.owner.email:
|
||||
owner_string = '%s <%s>' % (change.owner_name,
|
||||
change.owner.email)
|
||||
else:
|
||||
owner_string = change.owner_name
|
||||
self.owner_label.text.set_text(('change-data', owner_string))
|
||||
self.project_label.text.set_text(('change-data', change.project.name))
|
||||
self.branch_label.set_text(('change-data', change.branch))
|
||||
self.topic_label.text.set_text(('change-data', self.topic))
|
||||
|
Loading…
x
Reference in New Issue
Block a user