blob: 33867298c27aa19b91b8075924874f41ab9e2e51 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
Template.userAvatar.helpers({
userData: function() {
if (! this.user) {
this.user = Users.findOne(this.userId);
}
return this.user;
},
memberType: function() {
var userId = this.userId || this.user._id;
var user = Users.findOne(userId);
return user && user.isBoardAdmin() ? 'admin' : 'normal';
}
});
Template.setLanguagePopup.helpers({
languages: function() {
return _.map(TAPi18n.getLanguages(), function(lang, tag) {
return {
tag: tag,
name: lang.name
};
});
},
isCurrentLanguage: function() {
return this.tag === TAPi18n.getLanguage();
}
});
|