Vulcan/packages/custom/lib/custom_fields.js

45 lines
714 B
JavaScript
Raw Normal View History

2015-04-24 09:28:50 +09:00
// Custom Post Field
2014-12-11 12:07:41 +09:00
2015-05-17 15:38:02 +09:00
Posts.addField({
2015-05-11 12:39:32 +09:00
fieldName: 'customPostField',
fieldSchema: {
2015-05-11 12:39:32 +09:00
type: String,
optional: true,
editableBy: ["member", "admin"]
}
});
// Custom Comment Field
2015-05-17 15:38:02 +09:00
Comments.addField({
2015-05-11 12:39:32 +09:00
fieldName: 'customCommentField',
fieldSchema: {
type: String,
optional: true,
editableBy: ["member", "admin"]
}
});
// Custom User Field
2015-05-17 15:38:02 +09:00
Users.addField({
2015-05-11 12:39:32 +09:00
fieldName: 'customUserField',
fieldSchema: {
type: String,
optional: true,
editableBy: ["member", "admin"]
}
});
// Custom Setting Field
2015-05-17 15:38:02 +09:00
Settings.addField({
2015-05-11 12:39:32 +09:00
fieldName: "customSettingsField",
fieldSchema: {
type: String,
optional: true,
autoform: {
2015-05-11 12:39:32 +09:00
group: "customGroup"
}
}
2015-05-11 12:39:32 +09:00
});