Skip to content
Snippets Groups Projects
Commit 51a6793b authored by Hermann's avatar Hermann
Browse files

show tables for userdetails in new style

parent c8fb74b0
No related branches found
No related tags found
No related merge requests found
import m from 'mithril';
import { Card, Toolbar, ToolbarTitle, Button } from 'polythene-mithril';
import ItemView from '../views/itemView';
import TableView from '../views/tableView';
import SelectList from '../views/selectList';
......@@ -73,20 +74,40 @@ export default class UserView extends ItemView {
m('td.detail-descriptor', config.keyDescriptors[key]),
m('td', this.data[key] ? this.data[key] : ''),
]))),
m('h2', 'Memberships'), m('br'),
this.groupchoice ? groupSelect : '',
m(TableView, {
controller: this.groupmemberships,
keys: ['group.name', 'expiry'],
titles: ['groupname', 'expiry'],
onAdd: () => { this.groupchoice = true; },
}),
m('h2', 'Signups'), m('br'),
m(TableView, {
controller: this.eventsignups,
keys: ['event.title_de'],
titles: ['event'],
}),
m('div.viewcontainer', [
m('div.viewcontainercolumn', m(Card, {
style: { height: '300px', 'margin-bottom': '20px' },
content: m('div', [
m(Toolbar, { compact: true }, [
m(ToolbarTitle, { text: 'Event Signups' }),
]),
m(TableView, {
controller: this.eventsignups,
keys: ['event.title_de'],
titles: ['event'],
}),
]),
})),
m('div.viewcontainercolumn', m(Card, {
style: { height: '300px', 'margin-bottom': '10px' },
content: m('div', [
this.groupchoice ? groupSelect : '',
m(Toolbar, { compact: true }, [
m(ToolbarTitle, { text: 'Group Memberships' }),
m(Button, {
className: 'blue-button',
label: 'add',
events: { onclick: () => { this.groupchoice = true; } },
}),
]),
m(TableView, {
controller: this.groupmemberships,
keys: ['group.name', 'expiry'],
titles: ['groupname', 'expiry'],
}),
]),
})),
]),
]);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment