2014-05-01 19:34:24 -07:00
|
|
|
// Settings = new Meteor.Collection('settings');
|
|
|
|
|
|
|
|
Settings = new Meteor.Collection("settings", {
|
|
|
|
schema: new SimpleSchema({
|
|
|
|
title: {
|
|
|
|
type: String,
|
|
|
|
label: "Title",
|
2014-05-07 10:09:56 +09:00
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
tagline: {
|
|
|
|
type: String,
|
2014-05-07 10:09:56 +09:00
|
|
|
label: "Tagline",
|
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
copies: {
|
|
|
|
type: Number,
|
|
|
|
label: "Number of copies",
|
2014-05-07 10:09:56 +09:00
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
requireViewInvite: {
|
|
|
|
type: Boolean,
|
|
|
|
label: "Require invite to view",
|
2014-05-07 10:09:56 +09:00
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
requirePostInvite: {
|
|
|
|
type: Boolean,
|
|
|
|
label: "Require invite to post",
|
2014-05-07 10:09:56 +09:00
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
requirePostsApproval: {
|
|
|
|
type: Boolean,
|
|
|
|
label: "Posts must be approved by admin",
|
2014-05-07 10:09:56 +09:00
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
emailNotifications: {
|
|
|
|
type: Boolean,
|
|
|
|
label: "Enable email notifications",
|
2014-05-07 10:09:56 +09:00
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
nestedComments: {
|
|
|
|
type: Boolean,
|
|
|
|
label: "Enable nested comments",
|
2014-05-07 10:09:56 +09:00
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
redistributeKarma: {
|
|
|
|
type: Boolean,
|
|
|
|
label: "Enable redistributed karma",
|
2014-05-07 10:09:56 +09:00
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
defaultEmail: {
|
|
|
|
type: String,
|
2014-05-07 10:09:56 +09:00
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
scoreUpdateInterval: {
|
|
|
|
type: Number,
|
2014-05-07 10:09:56 +09:00
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
postInterval: {
|
|
|
|
type: Number,
|
2014-05-07 10:09:56 +09:00
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
commentInterval: {
|
|
|
|
type: Number,
|
2014-05-07 10:09:56 +09:00
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
maxPostsPerDay: {
|
|
|
|
type: Number,
|
2014-05-07 10:09:56 +09:00
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
startInvitesCount: {
|
|
|
|
type: Number,
|
2014-05-07 10:09:56 +09:00
|
|
|
defaultValue: 3,
|
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
postsPerPage: {
|
|
|
|
type: Number,
|
2014-05-07 10:09:56 +09:00
|
|
|
defaultValue: 10,
|
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
logoUrl: {
|
2014-05-07 10:09:56 +09:00
|
|
|
type: String,
|
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
logoHeight: {
|
2014-05-07 10:09:56 +09:00
|
|
|
type: Number,
|
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
logoWidth: {
|
2014-05-07 10:09:56 +09:00
|
|
|
type: Number,
|
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
language: {
|
|
|
|
type: String,
|
2014-05-07 10:09:56 +09:00
|
|
|
defaultValue: 'en',
|
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
backgroundColor: {
|
2014-05-07 10:09:56 +09:00
|
|
|
type: String,
|
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
secondaryColor: {
|
2014-05-07 10:09:56 +09:00
|
|
|
type: String,
|
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
buttonColor: {
|
2014-05-07 10:09:56 +09:00
|
|
|
type: String,
|
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
headerColor: {
|
2014-05-07 10:09:56 +09:00
|
|
|
type: String,
|
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
googleAnalyticsId: {
|
2014-05-07 10:09:56 +09:00
|
|
|
type: String,
|
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
mixpanelId: {
|
2014-05-07 10:09:56 +09:00
|
|
|
type: String,
|
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
clickyId: {
|
2014-05-07 10:09:56 +09:00
|
|
|
type: String,
|
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
embedlyId: {
|
2014-05-07 10:09:56 +09:00
|
|
|
type: String,
|
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
mailChimpAPIKey: {
|
2014-05-07 10:09:56 +09:00
|
|
|
type: String,
|
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
mailChimpListId: {
|
2014-05-07 10:09:56 +09:00
|
|
|
type: String,
|
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
footerCode: {
|
2014-05-07 10:09:56 +09:00
|
|
|
type: String,
|
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
extraCode: {
|
2014-05-07 10:09:56 +09:00
|
|
|
type: String,
|
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
notes: {
|
2014-05-07 10:09:56 +09:00
|
|
|
type: String,
|
|
|
|
optional: true
|
2014-05-01 19:34:24 -07:00
|
|
|
},
|
|
|
|
})
|
|
|
|
});
|
2013-07-04 12:51:26 +09:00
|
|
|
|
|
|
|
Settings.allow({
|
|
|
|
insert: isAdminById
|
|
|
|
, update: isAdminById
|
|
|
|
, remove: isAdminById
|
|
|
|
});
|
|
|
|
|