improve the display of evolution author in case it is the original submitter

This commit is contained in:
Frédéric Péters 2012-08-16 15:00:59 +02:00
parent 459b1670eb
commit 7b33eacf9c
1 changed files with 18 additions and 4 deletions

View File

@ -153,10 +153,24 @@ class FormStatusPage(Directory):
for evo in self.filled.evolution:
"<dt>%s" % misc.localstrftime(evo.time)
if evo.who:
try:
' <span class="user">%s</span>' % evo.get_author_name()
except KeyError:
pass
evo_author = None
if evo.who == '_submitter':
evo_author = _('Original Submitter')
if self.filled.is_submitter(get_request().user):
evo_author = _('Yourself')
elif self.filled.user_id:
try:
evo_author = _('Original Submitter (%s)') % \
get_publisher().user_class.get(self.filled.user_id).display_name
except KeyError:
pass
else:
try:
evo_author = evo.get_author_name()
except KeyError:
pass
if evo_author:
' <span class="user">%s</span>' % evo_author
'</dt>'
'<dd>'
if evo.status: