зеркало из https://github.com/mozilla/CSOL-site.git
Merge pull request #700 from stenington/677-name-consistency
Consistent user name display
This commit is contained in:
Коммит
3d23870e10
|
@ -131,7 +131,8 @@ function extractUserData (user) {
|
||||||
favorites: [],
|
favorites: [],
|
||||||
dependents: [],
|
dependents: [],
|
||||||
home: userHome,
|
home: userHome,
|
||||||
underage: user.underage
|
underage: user.underage,
|
||||||
|
displayName: user.getDisplayName()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ module.exports = {
|
||||||
return this.firstName + ' ' + this.lastName;
|
return this.firstName + ' ' + this.lastName;
|
||||||
},
|
},
|
||||||
getDisplayName: function () {
|
getDisplayName: function () {
|
||||||
return this.firstName || this.username;
|
return this.username;
|
||||||
},
|
},
|
||||||
getActivities: function (options, callback) {
|
getActivities: function (options, callback) {
|
||||||
var learner = this;
|
var learner = this;
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block no_data %}
|
{% 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 %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block finally %}
|
{% block finally %}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends 'layout.html' %}
|
{% extends 'layout.html' %}
|
||||||
{% set pageTitle = user.username + '’s Playlist' %}
|
{% set pageTitle = user.displayName + '’s Playlist' %}
|
||||||
{% set bodyClass = 'myplaylist' %}
|
{% set bodyClass = 'myplaylist' %}
|
||||||
{% set navItem = 'backpack' %}
|
{% set navItem = 'backpack' %}
|
||||||
{% set subNavItem = 'playlist' %}
|
{% set subNavItem = 'playlist' %}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче