activity: Display the user portion of the email address rather than short_name.

Apparently short_name is not consistently the person's username
in our system -- for many MIT people, it's their full name.

(imported from commit d975300a59c7afe5ee20b4a0db1bd51110c3df33)
This commit is contained in:
Waseem Daher 2013-01-18 13:47:43 -05:00
parent 068c702883
commit dfadc79dc9
2 changed files with 2 additions and 2 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>{{ row.short_name }}</strong></td>
<td><strong>{{ row.username }}</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,7 +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['username'] = record.user_profile.user.email.split('@')[0]
row[query_name + '_count'] = record.count
row[query_name + '_last' ] = record.last_visit