Browse Source

Allow subscriptions with no free plans, and adjust styles

James Allen 11 năm trước cách đây
mục cha
commit
2a78a7843a

+ 12 - 8
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

+ 1 - 1
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()
 

+ 4 - 0
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;
+  }
 }