diff --git a/services/web/app/coffee/Features/Subscription/SubscriptionController.coffee b/services/web/app/coffee/Features/Subscription/SubscriptionController.coffee index 78b97ed166..508656b3fc 100644 --- a/services/web/app/coffee/Features/Subscription/SubscriptionController.coffee +++ b/services/web/app/coffee/Features/Subscription/SubscriptionController.coffee @@ -14,11 +14,16 @@ module.exports = SubscriptionController = plansPage: (req, res, next) -> plans = SubscriptionViewModelBuilder.buildViewModel() + if !req.session.user? + baseUrl = "/register?redir=" + else + baseUrl = "" viewName = "subscriptions/plans" logger.log viewName:viewName, "showing plans page" res.render viewName, title: "Plans and Pricing" - + plans: plans + baseUrl: baseUrl #get to show the recurly.js page paymentPage: (req, res, next) -> @@ -161,22 +166,3 @@ module.exports = SubscriptionController = return next(error) if error? req.body = body next() - - -gaExperimentCode = ''' - - - - -''' \ No newline at end of file diff --git a/services/web/app/views/subscriptions/plans.jade b/services/web/app/views/subscriptions/plans.jade index 02520c3485..f5d38ddc37 100644 --- a/services/web/app/views/subscriptions/plans.jade +++ b/services/web/app/views/subscriptions/plans.jade @@ -11,7 +11,7 @@ block content .row .col-md-12 - p.text-centered ShareLaTeX is the world's easiest to use LaTeX editor. You'll stay up to date with your collaborators, keep track of all changes to your work, and use our up to date and fast compiling environment from anywhere in the world. + p.text-centered ShareLaTeX is the world's easiest to use LaTeX editor. You'll stay up to date with your collaborators, keep track of all changes to your work, and use our LaTeX environment from anywhere in the world. .row(ng-cloak) .col-md-12 @@ -62,7 +62,7 @@ block content li br a.btn.btn-primary( - ng-href="/user/subscription/new?planCode=collaborator{{ ui.view == 'annual' && '_annual' || ''}}" + ng-href="#{baseUrl}/user/subscription/new?planCode=collaborator{{ ui.view == 'annual' && '_annual' || ''}}" ) Sign up now! .card .card-header @@ -81,7 +81,7 @@ block content li br a.btn.btn-primary( - ng-href="/user/subscription/new?planCode=professional{{ ui.view == 'annual' && '_annual' || ''}}" + ng-href="#{baseUrl}/user/subscription/new?planCode=professional{{ ui.view == 'annual' && '_annual' || ''}}" ) Sign up now! .card-group.text-centered(ng-if="ui.view == 'student'") @@ -109,7 +109,7 @@ block content li br a.btn.btn-primary( - ng-href="/user/subscription/new?planCode=student" + ng-href="#{baseUrl}/user/subscription/new?planCode=student" ) Sign up now! .card .card-header @@ -125,7 +125,7 @@ block content li br a.btn.btn-primary( - ng-href="/user/subscription/new?planCode=student_annual" + ng-href="#{baseUrl}/user/subscription/new?planCode=student_annual" ) Sign up now! .row(ng-cloak) @@ -175,7 +175,7 @@ block content li.small All the advantages of the Professional account for each team member li br - a.btn.btn-primary(href="/user/subscription/new?planCode=group_5_members{{ ui.view == 'annual' && '_annual' || ''}}") Sign up now! + a.btn.btn-primary(href="#{baseUrl}/user/subscription/new?planCode=group_5_members{{ ui.view == 'annual' && '_annual' || ''}}") Sign up now! .card.highlighted .card-header h2 Research Lab @@ -191,7 +191,7 @@ block content li.small All the advantages of the Professional account for each team member li br - a.btn.btn-primary(href="/user/subscription/new?planCode=group_10_members{{ ui.view == 'annual' && '_annual' || ''}}") Sign up now! + a.btn.btn-primary(href="#{baseUrl}/user/subscription/new?planCode=group_10_members{{ ui.view == 'annual' && '_annual' || ''}}") Sign up now! .card .card-header h2 Department @@ -207,4 +207,4 @@ block content li.small All the advantages of the Professional account for each team member li br - a.btn.btn-primary(href="/user/subscription/new?planCode=group_20_members{{ ui.view == 'annual' && '_annual' || ''}}") Sign up now! + a.btn.btn-primary(href="#{baseUrl}/user/subscription/new?planCode=group_20_members{{ ui.view == 'annual' && '_annual' || ''}}") Sign up now!