Vulcan/client/views/users/user_profile.js

20 lines
506 B
JavaScript
Raw Normal View History

2012-09-24 22:27:29 +02:00
Template.user_profile.user = function(){
2012-10-11 08:23:52 +09:00
if(userId=Session.get('selectedUserId')){
return Meteor.users.findOne(userId);
2012-09-24 22:27:29 +02:00
}
}
2012-10-11 08:23:52 +09:00
Template.user_profile.avatarUrl = function(){
2012-09-24 22:27:29 +02:00
return Gravatar.getGravatar(this, {
d: 'http://telescope.herokuapp.com/img/default_avatar.png',
s: 80
});
}
2012-10-11 08:23:52 +09:00
Template.user_profile.createdAtFormatted = Template.user_item.createdAtFormatted;
2012-09-24 22:27:29 +02:00
2012-10-11 08:23:52 +09:00
Template.user_profile.isCurrentUser = function(){
return Meteor.user() && (Session.get('selectedUserId') === Meteor.user()._id);
2012-09-24 22:27:29 +02:00
}