2015-04-13 14:52:03 +09:00
|
|
|
Template.usersDashboard.helpers({
|
2015-02-12 23:28:14 -05:00
|
|
|
settings: function() {
|
|
|
|
return {
|
2015-02-16 17:54:25 -05:00
|
|
|
collection: 'all-users',
|
2015-02-12 23:28:14 -05:00
|
|
|
rowsPerPage: 20,
|
|
|
|
showFilter: true,
|
|
|
|
fields: [
|
|
|
|
{ key: 'avatar', label: '', tmpl: Template.users_list_avatar, sortable: false },
|
|
|
|
{ key: 'username', label: 'Username', tmpl: Template.users_list_username },
|
2015-03-12 10:12:47 +01:00
|
|
|
{ key: 'profile.username', label: 'Display Name' },
|
2015-02-12 23:28:14 -05:00
|
|
|
{ key: 'profile.email', label: 'Email', tmpl: Template.users_list_email },
|
2015-02-13 01:47:36 -05:00
|
|
|
{ key: 'createdAt', label: 'Member Since', tmpl: Template.users_list_created_at, sort: 'descending' },
|
2015-02-12 23:28:14 -05:00
|
|
|
{ key: 'postCount', label: 'Posts' },
|
|
|
|
{ key: 'commentCount', label: 'Comments' },
|
|
|
|
{ key: 'karma', label: 'Karma', fn: function(val){return Math.round(100*val)/100} },
|
|
|
|
{ key: 'inviteCount', label: 'Invites' },
|
|
|
|
{ key: 'isInvited', label: 'Invited', fn: function(val){return val ? 'Yes':'No'} },
|
|
|
|
{ key: 'isAdmin', label: 'Admin', fn: function(val){return val ? 'Yes':'No'} },
|
|
|
|
{ key: 'actions', label: 'Actions', tmpl: Template.users_list_actions, sortable: false }
|
|
|
|
]
|
|
|
|
};
|
|
|
|
}
|
|
|
|
});
|