Vulcan/collections/settings.js

168 lines
3 KiB
JavaScript
Raw Normal View History

2014-07-06 14:09:55 +09:00
settingsSchemaObject = {
title: {
type: String,
label: "Title",
optional: true
},
siteUrl: {
type: String,
2014-07-18 09:21:45 +09:00
optional: true,
label: 'Site URL (include trailing slash)'
2014-07-06 14:09:55 +09:00
},
tagline: {
type: String,
label: "Tagline",
optional: true
},
requireViewInvite: {
type: Boolean,
label: "Require invite to view",
optional: true
},
requirePostInvite: {
type: Boolean,
label: "Require invite to post",
optional: true
},
requirePostsApproval: {
type: Boolean,
label: "Posts must be approved by admin",
optional: true
},
emailNotifications: {
type: Boolean,
label: "Enable email notifications",
optional: true
},
nestedComments: {
type: Boolean,
label: "Enable nested comments",
optional: true
},
redistributeKarma: {
type: Boolean,
label: "Enable redistributed karma",
optional: true
},
defaultEmail: {
type: String,
optional: true
},
scoreUpdateInterval: {
type: Number,
optional: true
},
postInterval: {
type: Number,
optional: true
},
commentInterval: {
type: Number,
optional: true
},
maxPostsPerDay: {
type: Number,
optional: true
},
startInvitesCount: {
type: Number,
defaultValue: 3,
optional: true
},
postsPerPage: {
type: Number,
defaultValue: 10,
optional: true
},
logoUrl: {
type: String,
optional: true
},
logoHeight: {
2014-06-22 10:58:02 +09:00
type: Number,
optional: true
2014-07-06 14:09:55 +09:00
},
logoWidth: {
2014-06-22 10:58:02 +09:00
type: Number,
optional: true
2014-07-06 14:09:55 +09:00
},
language: {
type: String,
defaultValue: 'en',
optional: true
},
2014-07-11 10:54:07 +09:00
backgroundCSS: {
2014-07-06 14:09:55 +09:00
type: String,
2014-07-11 10:54:07 +09:00
optional: true,
label: "Background CSS: color, image, etc."
2014-07-06 14:09:55 +09:00
},
secondaryColor: {
type: String,
optional: true
},
buttonColor: {
type: String,
optional: true
},
headerColor: {
type: String,
optional: true
},
twitterAccount: {
type: String,
optional: true
},
googleAnalyticsId: {
type: String,
optional: true
},
mixpanelId: {
type: String,
optional: true
},
clickyId: {
type: String,
optional: true
},
embedlyId: {
type: String,
optional: true
},
mailChimpAPIKey: {
type: String,
optional: true
},
mailChimpListId: {
type: String,
optional: true
},
footerCode: {
type: String,
optional: true
},
extraCode: {
type: String,
optional: true
},
notes: {
type: String,
optional: true
}
};
// add any extra properties to settingsSchemaObject (provided by packages for example)
_.each(addToSettingsSchema, function(item){
settingsSchemaObject[item.propertyName] = item.propertySchema;
});
Settings = new Meteor.Collection("settings", {
schema: new SimpleSchema(settingsSchemaObject)
2014-05-01 19:34:24 -07:00
});
2013-07-04 12:51:26 +09:00
Settings.allow({
2014-06-22 10:58:02 +09:00
insert: isAdminById,
update: isAdminById,
remove: isAdminById
2013-07-04 12:51:26 +09:00
});