activity: Display short name instead of full email address.

As of this writing, short_name is the part before the @-sign,
and we already display the realm, so no need to display it
twice.

(imported from commit f5f9b29bff99b36b0c23176348c2869193467c38)
This commit is contained in:
Waseem Daher 2013-01-18 13:34:39 -05:00
parent 764047e113
commit 068c702883
2 changed files with 2 additions and 1 deletions

View File

@ -43,7 +43,7 @@
{% for email, row in activity.sorted_rows %}
<tr class="{{ row.class }}">
<td><strong>{{ row.full_name }}</strong></td>
<td><strong>{{ email }}</strong></td>
<td><strong>{{ row.short_name }}</strong></td>
<td><strong>{{ row.realm }}</strong></td>
<td sorttable_customkey="{{ row.get_updates_last|date:'YmdHi' }}">{{ row.get_updates_last }}</td>
<td sorttable_customkey="{{ row.send_message_last|date:'YmdHi' }}">{{ row.send_message_last }}</td>

View File

@ -1160,6 +1160,7 @@ class ActivityTable(object):
row = self.rows.setdefault(record.user_profile.user.email, {})
row['realm'] = record.user_profile.realm.domain
row['full_name'] = record.user_profile.full_name
row['short_name'] = record.user_profile.short_name
row[query_name + '_count'] = record.count
row[query_name + '_last' ] = record.last_visit