Vulcan/client/views/users/user_profile.js

20 lines
505 B
JavaScript
Raw Normal View History

2012-09-24 22:27:29 +02:00
Template.user_profile.user = function(){
2012-10-01 16:08:30 +09:00
if(window.selectedUserId){
return Meteor.users.findOne(window.selectedUserId);
2012-09-24 22:27:29 +02:00
}
}
Template.user_profile.avatar_url = function(){
return Gravatar.getGravatar(this, {
d: 'http://telescope.herokuapp.com/img/default_avatar.png',
s: 80
});
}
Template.user_profile.created_at_formatted = Template.user_item.created_at_formatted;
Template.user_profile.is_current_user = function(){
2012-10-01 16:08:30 +09:00
return Meteor.user() && (window.selectedUserId === Meteor.user()._id);
2012-09-24 22:27:29 +02:00
}