adding title and description to profile pages

This commit is contained in:
Sacha Greif 2014-12-15 09:52:37 +09:00
parent f8cb992069
commit 2f273011b1
2 changed files with 18 additions and 0 deletions

View file

@ -284,6 +284,8 @@
"newest_posts": "The newest posts.",
"highest_ranked_posts_ever": "The all-time highest-ranked posts.",
"the_profile_of": "The profile of",
"posts_awaiting_moderation": "Posts awaiting moderation.",
"future_scheduled_posts": "Future scheduled posts.",
"users_dashboard": "Users dashboard.",

View file

@ -1,11 +1,17 @@
// Controller for user pages
UserPageController = RouteController.extend({
waitOn: function() {
return [
coreSubscriptions.subscribe('singleUser', this.params._idOrSlug)
]
},
getUser: function () {
return Meteor.users.findOne({slug: this.params._idOrSlug});
},
data: function() {
var findById = Meteor.users.findOne(this.params._idOrSlug);
var findBySlug = Meteor.users.findOne({slug: this.params._idOrSlug});
@ -18,7 +24,17 @@ UserPageController = RouteController.extend({
};
}
},
getTitle: function () {
return getDisplayName(this.getUser()) + ' - ' + getSetting('title');
},
getDescription: function () {
return i18n.t('the_profile_of') + ' ' + getDisplayName(this.getUser());
},
fastRender: true
});
// Controller for user account editing