Merge pull request #700 from stenington/677-name-consistency

Consistent user name display
This commit is contained in:
Chris McAvoy 2013-06-25 12:42:06 -07:00
Родитель 97ead675a9 4f281f5837
Коммит 3d23870e10
4 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -131,7 +131,8 @@ function extractUserData (user) {
favorites: [],
dependents: [],
home: userHome,
underage: user.underage
underage: user.underage,
displayName: user.getDisplayName()
};
}

Просмотреть файл

@ -108,7 +108,7 @@ module.exports = {
return this.firstName + ' ' + this.lastName;
},
getDisplayName: function () {
return this.firstName || this.username;
return this.username;
},
getActivities: function (options, callback) {
var learner = this;

Просмотреть файл

@ -32,7 +32,7 @@
{% endblock %}
{% block no_data %}
<p>Welcome! It doesn't look like you've earned any Chicago Summer of Learning badges yet. Have no fear! You can check out cool projects in science, technology, engineering, art and math now on the <a href="/earn">Earn page</a>.<p>
<p>Welcome {{ user.displayName }}! It doesn't look like you've earned any Chicago Summer of Learning badges yet. Have no fear! You can check out cool projects in science, technology, engineering, art and math now on the <a href="/earn">Earn page</a>.<p>
{% endblock %}
{% block finally %}

Просмотреть файл

@ -1,5 +1,5 @@
{% extends 'layout.html' %}
{% set pageTitle = user.username + 's Playlist' %}
{% set pageTitle = user.displayName + 's Playlist' %}
{% set bodyClass = 'myplaylist' %}
{% set navItem = 'backpack' %}
{% set subNavItem = 'playlist' %}