summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-08-07 18:30:51 -0400
committerJules Laplace <jules@okfoc.us>2015-08-07 18:30:51 -0400
commite0aebb7ef327f29c0ab8f5b75a24c5d823dfd90f (patch)
treefb8e5f08c56ef925f151c18acab305a5f1a3858c
parent6f0e2933af03a3fb89b5ce2df0579fd8ef6c175b (diff)
lockout
-rw-r--r--public/assets/javascripts/ui/site/LayoutsModal.js11
-rw-r--r--server/lib/api/layouts.js3
2 files changed, 2 insertions, 12 deletions
diff --git a/public/assets/javascripts/ui/site/LayoutsModal.js b/public/assets/javascripts/ui/site/LayoutsModal.js
index f69b38f..b620b58 100644
--- a/public/assets/javascripts/ui/site/LayoutsModal.js
+++ b/public/assets/javascripts/ui/site/LayoutsModal.js
@@ -16,15 +16,8 @@ var LayoutsIndex = View.extend({
populate: function(data){
/*
- if (data.layoutCounts.basic > data.plan.basic_layout_limit) {
- }
- if (data.layoutCounts.pro > data.plan.pro_layout_limit) {
- }
- if (data.projectCounts.stock > data.plan.stock_project_limit) {
- }
- if (data.projectCounts.basic > data.plan.basic_project_limit) {
- }
- if (data.projectCounts.pro > data.plan.pro_project_limit) {
+ if (data.user.plan_level < 1 && data.projectCounts.free == 1) {
+ // show lockout message
}
*/
if (! data.layouts.length) {
diff --git a/server/lib/api/layouts.js b/server/lib/api/layouts.js
index 1c87fae..a3edc38 100644
--- a/server/lib/api/layouts.js
+++ b/server/lib/api/layouts.js
@@ -9,12 +9,9 @@ var _ = require('lodash'),
var layouts = {
index: function(req, res){
- // free layouts
- // user layouts
Layout.find({}, function(err, docs){
res.json({
layouts: docs,
- plan: middleware.plans[ res.locals.user.plan_level || 0 ],
user: res.locals.user,
layoutCounts: res.locals.layoutCounts,
projectCounts: res.locals.projectCounts,