mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 20:16:39 -04:00
19 lines
No EOL
409 B
JavaScript
19 lines
No EOL
409 B
JavaScript
Template[getTemplate('gravatar')].helpers({
|
|
gravatarUrl: function () {
|
|
if (this.user){
|
|
return getAvatarUrl(this.user);
|
|
}
|
|
else if (this.userId) {
|
|
var user=Meteor.users.findOne(this.userId);
|
|
if (user){
|
|
return getAvatarUrl(user);
|
|
}
|
|
}
|
|
},
|
|
cssClass: function(){
|
|
if (this.class){
|
|
return this.class;
|
|
}
|
|
return 'user-avatar';
|
|
}
|
|
}); |