mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
19 lines
No EOL
392 B
JavaScript
19 lines
No EOL
392 B
JavaScript
Template[getTemplate('avatar')].helpers({
|
|
url: 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';
|
|
}
|
|
}); |