From 2a78a7843a192f6d2198c53f7c498f2a294a3481 Mon Sep 17 00:00:00 2001 From: James Allen Date: Thu, 29 Jan 2015 10:44:42 +0000 Subject: [PATCH] Allow subscriptions with no free plans, and adjust styles --- services/web/app/views/subscriptions/new.jade | 20 +++++++++++-------- .../coffee/main/new-subscription.coffee | 2 +- .../public/stylesheets/core/scaffolding.less | 4 ++++ 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/services/web/app/views/subscriptions/new.jade b/services/web/app/views/subscriptions/new.jade index 7daafd6193..fde06d571c 100644 --- a/services/web/app/views/subscriptions/new.jade +++ b/services/web/app/views/subscriptions/new.jade @@ -22,11 +22,9 @@ block content .card.card-highlighted .page-header .row - .col-md-9 + .col-xs-9 h2 {{planName}} - div !{translate("first_few_days_free", {trialLen:'{{trialLength}}'})} - div #{translate("every")} {{billingCycleType}} - .col-md-3 + .col-xs-3 div.dropdown.changePlanButton.pull-right(ng-cloak) a.btn.btn-default.dropdown-toggle( href="#", @@ -39,7 +37,13 @@ block content a( ng-click="changeCurrency(currency)", ) {{currency}} ({{value['symbol']}}) - h2.pull-right.totalPrice {{price.currency.symbol}}{{price.next.total}} + hr.thin + .row + .col-md-12.text-center + div(ng-if="trialLength") !{translate("first_few_days_free", {trialLen:'{{trialLength}}'})} + div(ng-if="price") + strong {{price.currency.symbol}}{{price.next.total}} + span #{translate("every")} {{billingCycleType}} .row .col-md-12 form(ng-show="planName") @@ -150,16 +154,16 @@ block content .row - .col-md-7 + .col-xs-7 .form-group button.btn.btn-success(ng-click="submit()", ng-disabled="processing") #{translate("upgrade_now")} - .col-md-3.pricingBreakdown + .col-xs-3.pricingBreakdown div Subtotal div Tax div strong Total - .col-md-2 + .col-xs-2 div.pull-right {{price.currency.symbol}}{{price.next.subtotal}} div.pull-right {{price.currency.symbol}}{{price.next.tax}} div.pull-right diff --git a/services/web/public/coffee/main/new-subscription.coffee b/services/web/public/coffee/main/new-subscription.coffee index 407e06e231..60d032fbe4 100644 --- a/services/web/public/coffee/main/new-subscription.coffee +++ b/services/web/public/coffee/main/new-subscription.coffee @@ -46,7 +46,7 @@ define [ pricing.on "change", => $scope.planName = pricing.items.plan.name $scope.price = pricing.price - $scope.trialLength = pricing.items.plan.trial.length + $scope.trialLength = pricing.items.plan.trial?.length $scope.billingCycleType = if pricing.items.plan.period.interval == "months" then "month" else "year" $scope.$apply() diff --git a/services/web/public/stylesheets/core/scaffolding.less b/services/web/public/stylesheets/core/scaffolding.less index fbf50534cd..b6dc68363d 100755 --- a/services/web/public/stylesheets/core/scaffolding.less +++ b/services/web/public/stylesheets/core/scaffolding.less @@ -114,6 +114,10 @@ hr { margin-bottom: @line-height-computed; border: 0; border-top: 1px solid @hr-border; + &.thin { + margin-top: @line-height-computed / 2; + margin-bottom: @line-height-computed / 2; + } }