diff options
| -rw-r--r-- | public/assets/javascripts/ui/site/EditSubscriptionModal.js | 11 | ||||
| -rwxr-xr-x | public/assets/stylesheets/app.css | 32 | ||||
| -rw-r--r-- | server/lib/api/subscription.js | 1 | ||||
| -rw-r--r-- | server/lib/views/index.js | 1 | ||||
| -rw-r--r-- | views/about/_plans.ejs | 63 | ||||
| -rw-r--r-- | views/partials/edit-subscription.ejs | 8 | ||||
| -rw-r--r-- | views/staff/_users.ejs | 3 |
7 files changed, 109 insertions, 10 deletions
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("<<<<<HI") res.render('about/_plans') }) }, diff --git a/views/about/_plans.ejs b/views/about/_plans.ejs new file mode 100644 index 0000000..1536ac3 --- /dev/null +++ b/views/about/_plans.ejs @@ -0,0 +1,63 @@ + <div class="about_plan planbox free_plan_info"> + <h3>[[- plans.free.name ]]</h3> + <ul> + <li> [[- plans.free.stock_project_limit ]] exhibition with pre-designed template floor plan + </ul> + </div> + + <div class="about_plan planbox"> + <h3>[[- plans.basic.name ]]</h3> + <ul> + <li> $[[- plans.basic.monthly_price ]]/mo or $[[- plans.basic.yearly_price ]]/year + <li> Comes with [[- plans.basic.basic_layout_limit ]] basic floor plan and [[- plans.basic.basic_project_limit ]] exhibitions + <li> Each new basic floor plan costs $[[- plans.basic.basic_layout_monthly_price ]]/mo + or $[[- plans.basic.basic_layout_yearly_price ]]/year, minimum 3 months + <li> Each new floor plan can have up to [[- plans.basic.basic_project_limit ]] exhibitions + <li> VValls logo appears when embedding an exhibition on a web page + <li> + [[ if (! logged_in) { ]] + <button data-role="show-signup-modal">Sign Up</button> + [[ } else if (! user.plan_level) { ]] + <a href="https://vvalls.recurly.com/subscribe/basic-monthly/[[- user._id ]]/[[- user.username ]]"><button>Buy Now</button></a> + [[ } else if (user.plan_level == plan.level) { ]] + Current Level + [[ } ]] + </ul> + </div> + + <div class="about_plan planbox"> + <h3>[[- plans.pro.name ]]</h3> + <ul> + <li> $[[- plans.pro.monthly_price ]]/mo or $[[- plans.pro.yearly_price ]]/year + <li> Comes with [[- plans.pro.pro_layout_limit ]] pro floor plan and [[- plans.pro.pro_project_limit ]] exhibitions + <li> Each new pro floor plan costs $[[- plans.pro.pro_layout_monthly_price ]]/mo + or $[[- plans.pro.pro_layout_yearly_price ]]/year, minimum 3 months + <li> Each new pro floor plan can have up to [[- plans.pro.pro_project_limit ]] exhibitions + <li> Includes planning for 3D objects in the room + <li> No VValls logo on embed + <li> + [[ if (! logged_in) { ]] + <button data-role="show-signup-modal">Sign Up</button> + [[ } else if (! user.plan_level) { ]] + <a href="https://vvalls.recurly.com/subscribe/pro-monthly/[[- user._id ]]/[[- user.username ]]"><button>Buy Now</button></a> + [[ } else if (user.plan_level == plan.level) { ]] + Current Level + [[ } else if (user.plan_level < plan.level) { ]] + <a href="/profile/billing"><button>Upgrade Now</button></a> + [[ } ]] + </ul> + </div> + + <div class="about_custom planbox miscbox"> + <ul> + <li> Buying any extra floor plan unlocks collaboration.<br>Invite an artist or curator to work on the exhibition with you. + <li> Basic Floor plan: Rectangle-based design of any dimension. + <li> Pro Floor plan: Trace an arbitrary floor plan from image. + </ul> + </div> + + <div class="about_custom planbox"> + <h3>Want Something Custom?</h3> + <li> We offer customized white-label options for business and educational uses. + <li> <a href="mailto:hello@vvalls.com">Contact us</a> for more information. + </div> 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 @@ <div class="mediaDrawer fixed animate editSubscription"> <span class="close">X</span> <div id="form_container"> - <form enctype="multipart/form-data" method="post"> + <form> <input type="hidden" name="_csrf" value="[[- token ]]"> <ul> <li class="section_break"> <h3>Edit Subscription</h3> </li> - <li id="free_plan"> + <li class="freePlan"> You are currently using the free version of Vvalls. For access to all of Vvalls features, consider upgrading to a paid plan. <br><br> - <a href="/about/brochure"><button>View the Plans</button></a> + <div class="planList"></div> </li> - <li id="paid_plan"> + <li class="paidPlan"> Your current plan level is <span data-role="planName"></span> <table> <tr class="planRow"> 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 @@ </td> <td class="editLinks"> <a href="/profile/[[- user.username ]]">[view profile]</a> - <a href="https://vvalls.recurly.com/accounts/[[- profile._id ]]">[recurly]</a> + <a href="/staff/users/[[- user.username ]]/media">[view media]</a> + <a href="https://vvalls.recurly.com/accounts/[[- user._id ]]">[recurly]</a> </td> <td> [[- user.last_seen ]] |
