From 5adac681bdb43b8b709795fa501689fb9ae8a4e1 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 28 Jan 2015 19:18:27 -0500 Subject: many methods --- views/staff/_users.ejs | 1 + 1 file changed, 1 insertion(+) (limited to 'views/staff/_users.ejs') diff --git a/views/staff/_users.ejs b/views/staff/_users.ejs index d46058f..053e289 100644 --- a/views/staff/_users.ejs +++ b/views/staff/_users.ejs @@ -12,6 +12,7 @@ [view profile] + [recurly] [[- user.last_seen ]] -- cgit v1.2.3-70-g09d2 From 5bfdedf2b92728dcead42e2ddd2b2e07311231ce Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 30 Jan 2015 17:27:31 -0500 Subject: inject brochure page onto billing if on free plan --- .../javascripts/ui/site/EditSubscriptionModal.js | 11 ++-- public/assets/stylesheets/app.css | 32 ++++++++++- server/lib/api/subscription.js | 1 + server/lib/views/index.js | 1 - views/about/_plans.ejs | 63 ++++++++++++++++++++++ views/partials/edit-subscription.ejs | 8 +-- views/staff/_users.ejs | 3 +- 7 files changed, 109 insertions(+), 10 deletions(-) create mode 100644 views/about/_plans.ejs (limited to 'views/staff/_users.ejs') diff --git a/public/assets/javascripts/ui/site/EditSubscriptionModal.js b/public/assets/javascripts/ui/site/EditSubscriptionModal.js index d5eb9ac..e7e1fa5 100644 --- a/public/assets/javascripts/ui/site/EditSubscriptionModal.js +++ b/public/assets/javascripts/ui/site/EditSubscriptionModal.js @@ -17,12 +17,13 @@ var EditSubscriptionModal = ModalFormView.extend({ // this.parent = opt.parent this.__super__.initialize.call(this) - this.$freePlan = this.$("#free_plan") - this.$paidPlan = this.$("#paid_plan") + this.$freePlan = this.$(".freePlan") + this.$paidPlan = this.$(".paidPlan") this.$planRow = this.$(".planRow") this.$basicLayoutRow = this.$(".basicLayoutRow") this.$proLayoutRow = this.$(".proLayoutRow") this.$totalRow = this.$(".totalRow") + this.$planList = this.$(".planList") this.$billingInterval = this.$("[data-role=billingInterval]") @@ -71,11 +72,15 @@ var EditSubscriptionModal = ModalFormView.extend({ return this.show() }, + show: function(){ if (! this.subscriber) { this.$freePlan.show() this.$paidPlan.hide() - this.__super__.show.call(this) + this.$planList.load("/partials/plans", function(){ + this.$(".free_plan_info").remove() + this.__super__.show.call(this) + }.bind(this)) return } diff --git a/public/assets/stylesheets/app.css b/public/assets/stylesheets/app.css index 5d7199c..8184032 100755 --- a/public/assets/stylesheets/app.css +++ b/public/assets/stylesheets/app.css @@ -904,6 +904,30 @@ iframe.embed { /* PLANS BROCHURE */ /* nb these styles should be fixed for narrower screens/mobile layout */ +.planList { + position: absolute; + left: 50%; + transform: translateX(-48%); +} +.planList .about_custom { + width: 56vw; + margin: 1vw 4vw; +} +.planList .planbox { + padding: 0; +} +.mediaDrawer .planList h3 { + margin-top: 3px; + font-size: 21px; + font-weight: bold +} +.freePlan { + text-align: left; +} +.planList .planbox li:first-child { + font-size: 1.9vw; + padding: 0; +} .about_plan { width: 28vw; margin: 2vw; @@ -940,7 +964,13 @@ iframe.embed { } .planbox li { list-style-type: none; - margin-bottom: 5px; + margin-bottom: 0; + font-size: 1.3vw; + padding: 0 5.6vw; +} +.about_custom.planbox li { + padding: 10px; + font-size: 17px; } .planbox.miscbox { border: 0; diff --git a/server/lib/api/subscription.js b/server/lib/api/subscription.js index b7b3434..9c77dfc 100644 --- a/server/lib/api/subscription.js +++ b/server/lib/api/subscription.js @@ -7,6 +7,7 @@ var _ = require('lodash'), User = require('../schemas/User'), Project = require('../schemas/Project'), Layout = require('../schemas/Layout'), + Plan = require('../schemas/Plan'); Subscription = require('../schemas/Subscription'); var plan_levels = { diff --git a/server/lib/views/index.js b/server/lib/views/index.js index 89167f7..9f244c8 100644 --- a/server/lib/views/index.js +++ b/server/lib/views/index.js @@ -107,7 +107,6 @@ var views = module.exports = { partials: { plans: function (req, res){ views_middleware.ensurePlans(req, res, function(){ - console.log("<<<< +

[[- plans.free.name ]]

+
    +
  • [[- plans.free.stock_project_limit ]] exhibition with pre-designed template floor plan +
+ + +
+

[[- plans.basic.name ]]

+
    +
  • $[[- plans.basic.monthly_price ]]/mo or $[[- plans.basic.yearly_price ]]/year +
  • Comes with [[- plans.basic.basic_layout_limit ]] basic floor plan and [[- plans.basic.basic_project_limit ]] exhibitions +
  • Each new basic floor plan costs $[[- plans.basic.basic_layout_monthly_price ]]/mo + or $[[- plans.basic.basic_layout_yearly_price ]]/year, minimum 3 months +
  • Each new floor plan can have up to [[- plans.basic.basic_project_limit ]] exhibitions +
  • VValls logo appears when embedding an exhibition on a web page +
  • + [[ if (! logged_in) { ]] + + [[ } else if (! user.plan_level) { ]] + + [[ } else if (user.plan_level == plan.level) { ]] + Current Level + [[ } ]] +
+
+ +
+

[[- plans.pro.name ]]

+
    +
  • $[[- plans.pro.monthly_price ]]/mo or $[[- plans.pro.yearly_price ]]/year +
  • Comes with [[- plans.pro.pro_layout_limit ]] pro floor plan and [[- plans.pro.pro_project_limit ]] exhibitions +
  • Each new pro floor plan costs $[[- plans.pro.pro_layout_monthly_price ]]/mo + or $[[- plans.pro.pro_layout_yearly_price ]]/year, minimum 3 months +
  • Each new pro floor plan can have up to [[- plans.pro.pro_project_limit ]] exhibitions +
  • Includes planning for 3D objects in the room +
  • No VValls logo on embed +
  • + [[ if (! logged_in) { ]] + + [[ } else if (! user.plan_level) { ]] + + [[ } else if (user.plan_level == plan.level) { ]] + Current Level + [[ } else if (user.plan_level < plan.level) { ]] + + [[ } ]] +
+
+ +
+
    +
  • Buying any extra floor plan unlocks collaboration.
    Invite an artist or curator to work on the exhibition with you. +
  • Basic Floor plan: Rectangle-based design of any dimension. +
  • Pro Floor plan: Trace an arbitrary floor plan from image. +
+
+ +
+

Want Something Custom?

+
  • We offer customized white-label options for business and educational uses. +
  • Contact us for more information. +
  • diff --git a/views/partials/edit-subscription.ejs b/views/partials/edit-subscription.ejs index 2f6e4c1..cc296f6 100644 --- a/views/partials/edit-subscription.ejs +++ b/views/partials/edit-subscription.ejs @@ -1,19 +1,19 @@
    X
    -
    +
    • Edit Subscription

    • -
    • +
    • You are currently using the free version of Vvalls. For access to all of Vvalls features, consider upgrading to a paid plan.

      - +
    • -
    • Your current plan level is diff --git a/views/staff/_users.ejs b/views/staff/_users.ejs index 053e289..46811b6 100644 --- a/views/staff/_users.ejs +++ b/views/staff/_users.ejs @@ -12,7 +12,8 @@
      [[- user.last_seen ]] -- cgit v1.2.3-70-g09d2 From ca838d172cbd7fca1f2cba3bb1f095821710920a Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 2 Feb 2015 17:53:16 -0500 Subject: userlist sort --- public/assets/stylesheets/staff.css | 14 ++++++++++++++ server/lib/views/staff.js | 4 +++- views/staff/_users.ejs | 13 +++++++++++++ views/staff/users/show.ejs | 31 ++++++++++++++++++++++++++++--- 4 files changed, 58 insertions(+), 4 deletions(-) (limited to 'views/staff/_users.ejs') diff --git a/public/assets/stylesheets/staff.css b/public/assets/stylesheets/staff.css index fffadbf..d93e46e 100644 --- a/public/assets/stylesheets/staff.css +++ b/public/assets/stylesheets/staff.css @@ -30,6 +30,15 @@ nav { nav a { margin-left: 10px; } +nav.subnav { + background: white; + padding: 10px; + font-weight: 200; + font-size: 12px; +} +.alphabet a { + margin-left: 5px; +} hr { border: 1px solid #bbb; margin: 10px auto 10px; @@ -62,8 +71,13 @@ hr { user-select: none; } .staff { + background: white; font-size: 15px; } +.staff hr { + border: 1px solid black; + border-top: 0; +} .staff .body a { border-bottom: 1px dotted; } diff --git a/server/lib/views/staff.js b/server/lib/views/staff.js index c3ecc97..b772859 100644 --- a/server/lib/views/staff.js +++ b/server/lib/views/staff.js @@ -368,8 +368,10 @@ var staff = module.exports = { helpers: { user: function(user){ + var last_seen = moment( user.last_seen || user.updated_at || user.created_at ) user = user.toObject() - user.last_seen = moment( user.last_seen || user.updated_at || user.created_at ).fromNow() + user.last_seen = last_seen.format("YYYY/MM/DD HH:MM") + " " + last_seen.fromNow() + user.last_charged = user.last_charged && moment( user.last_charged ).format("YYYY/MM/DD HH:MM") user.created_ip = util.num2ip( user.created_ip ) user.last_ip = util.num2ip( user.last_ip ) return user diff --git a/views/staff/_users.ejs b/views/staff/_users.ejs index 46811b6..1af47aa 100644 --- a/views/staff/_users.ejs +++ b/views/staff/_users.ejs @@ -1,9 +1,22 @@ + + [[ users.forEach(function(user){ ]] + diff --git a/views/staff/users/show.ejs b/views/staff/users/show.ejs index d6a21d5..e441109 100644 --- a/views/staff/users/show.ejs +++ b/views/staff/users/show.ejs @@ -17,13 +17,38 @@ [[- profile.displayName ]]
      + [[- user.plan_type ]] + [[- user.last_charged ]] + [[- user.username ]]
      + + [[ if (profile.subscription) { ]] +

      Subscription

      + + + + + + + + + +
      + plan + + [[- profile.plan_type ]] +
      + last charged + + [[- profile.last_charged ]] +
      + [[ } ]] +

      Profile

      -- cgit v1.2.3-70-g09d2 From 1169b347c1f339b64f30466004a3f9a06ef7e117 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 2 Feb 2015 18:16:09 -0500 Subject: find users by initial --- public/assets/stylesheets/staff.css | 8 ++++++++ server/lib/views/staff.js | 12 ++++++++++++ views/staff/_users.ejs | 10 ++++++++-- 3 files changed, 28 insertions(+), 2 deletions(-) (limited to 'views/staff/_users.ejs') diff --git a/public/assets/stylesheets/staff.css b/public/assets/stylesheets/staff.css index d93e46e..ebc240a 100644 --- a/public/assets/stylesheets/staff.css +++ b/public/assets/stylesheets/staff.css @@ -39,6 +39,14 @@ nav.subnav { .alphabet a { margin-left: 5px; } +.body .error { + color: #f00; + border: 1px solid #f00; + margin: 20px 5px 200px 5px; + padding: 10px; + width: 400px; + display: inline-block; +} hr { border: 1px solid #bbb; margin: 10px auto 10px; diff --git a/server/lib/views/staff.js b/server/lib/views/staff.js index b772859..07050f1 100644 --- a/server/lib/views/staff.js +++ b/server/lib/views/staff.js @@ -38,6 +38,7 @@ var staff = module.exports = { var criteria = req.criteria || {} var limit = paginationInfo.limit = Math.min( Number(req.query.limit) || 50, 200 ) var offset = paginationInfo.offset = Number(req.query.offset) || 0 + var initial = util.sanitize(req.query.initial) var sort paginationInfo.sort = req.query.sort paginationInfo.sortOptions = ["date", "last_seen", "username"] @@ -54,6 +55,9 @@ var staff = module.exports = { paginationInfo.sort = "username" break } + if (initial) { + criteria.username = new RegExp('^' + initial, "i") + } User.find(criteria) .select(staff.fields.user) .sort(sort) @@ -61,6 +65,14 @@ var staff = module.exports = { .limit(limit) .exec(function (err, users) { res.locals.users = users.map(staff.helpers.user) + if (! res.locals.users.length) { + if (initial) { + res.locals.opt.error = "No users found starting with " + initial.toUpperCase() + "" + } + else { + res.locals.opt.error = "No users found" + } + } next() }) }, diff --git a/views/staff/_users.ejs b/views/staff/_users.ejs index 1af47aa..9caf893 100644 --- a/views/staff/_users.ejs +++ b/views/staff/_users.ejs @@ -1,12 +1,18 @@ +[[ if (! users.length || opt.error) { ]] +
      + [[- opt.error ]] +
      +[[ } ]] +
      [[ users.forEach(function(user){ ]] -- cgit v1.2.3-70-g09d2 From f51b018fd760d8550a06cb900a1311164ea881ad Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 3 Feb 2015 13:15:58 -0500 Subject: emails --- server/lib/auth/mail.js | 2 +- views/home.ejs | 2 +- views/staff/_users.ejs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'views/staff/_users.ejs') diff --git a/server/lib/auth/mail.js b/server/lib/auth/mail.js index eac4007..990b53f 100644 --- a/server/lib/auth/mail.js +++ b/server/lib/auth/mail.js @@ -6,7 +6,7 @@ var email = require("emailjs"), var mail = { - from: 'VValls ', + from: 'VValls ', templates: {}, init: function(){ diff --git a/views/home.ejs b/views/home.ejs index ffb0976..20723a5 100755 --- a/views/home.ejs +++ b/views/home.ejs @@ -68,7 +68,7 @@

      Ready To Go Pro?

      Use VValls as part of your product, service, or marketing campaign. We offer many types of customizations, including automation of layouts, more elaborate floor plans, enhanced video, interactivity, and other features. - Contact + Contact [[ include partials/confirm-modal ]] diff --git a/views/staff/_users.ejs b/views/staff/_users.ejs index 9caf893..ee988ab 100644 --- a/views/staff/_users.ejs +++ b/views/staff/_users.ejs @@ -1,5 +1,5 @@