yogiben / meteor-admin

A complete admin dashboard solution
https://atmospherejs.com/yogiben/admin
GNU General Public License v3.0
826 stars 263 forks source link

Add column to users table ... e.g. sendThankYou #346

Open SantoshSrinivas79 opened 8 years ago

SantoshSrinivas79 commented 8 years ago

Is it possible to add a button to the "view all" table of "users" with an additional column containing a button like "sendThankyou" which can be made to trigger a thank you email using a method.

challett commented 8 years ago

Yes, inside of your tableColumns array add something like:
{ label: 'Thank', name: 'thank', template: 'sendThankYou'}. From here you will need to define a template named sendThankYou which would contain only a button. You can then define event handlers on this template to execute any logic you want.

MichaelJCole commented 8 years ago

@challett how to you access the tableColumns array for users?

I'm getting this error: Error: Users is not in the [object global] on this code:

AdminConfig = {
  collections: {
    Users: {
      icon: 'user',
      omitFields: ['updatedAt', 'createdAt', 'username'],
    },
  },
};
MichaelJCole commented 8 years ago

https://github.com/yogiben/meteor-admin/issues/319

challett commented 8 years ago

I'm not currently using the user collection part of this plugin so I am not sure, sorry.

challett commented 8 years ago

In retrospect maybe that's why this issue came about. I didn't think the user collection would act any different to the other ones.