Просмотр исходного кода

Merge pull request #880 from sharelatex/jel-v2-launch-plans

Launch v2 Plans Page
Jessica Lawshe 8 лет назад
Родитель
Сommit
aa2f6ad0dd

+ 23 - 26
services/web/app/coffee/Features/Subscription/SubscriptionController.coffee

@@ -15,33 +15,30 @@ planFeatures = require './planFeatures'
 module.exports = SubscriptionController =
 module.exports = SubscriptionController =
 
 
 	plansPage: (req, res, next) ->
 	plansPage: (req, res, next) ->
-		if Settings.overleaf? && !req.query.plns
-			res.redirect "#{Settings.overleaf.host}/plans"
-		else
-			plans = SubscriptionViewModelBuilder.buildViewModel()
-			viewName = "subscriptions/plans"
-			if req.query.v?
-				viewName = "#{viewName}_#{req.query.v}"
-			logger.log viewName:viewName, "showing plans page"
-			currentUser = null
-
-			GeoIpLookup.getCurrencyCode req.query?.ip || req.ip, (err, recomendedCurrency)->
-				return next(err) if err?
-				render = () ->
-					res.render viewName,
-						title: "plans_and_pricing"
-						plans: plans
-						gaExperiments: Settings.gaExperiments.plansPage
-						recomendedCurrency:recomendedCurrency
-						planFeatures: planFeatures
-				user_id = AuthenticationController.getLoggedInUserId(req)
-				if user_id?
-					UserGetter.getUser user_id, {signUpDate: 1}, (err, user) ->
-						return next(err) if err?
-						currentUser = user
-						render()
-				else
+		plans = SubscriptionViewModelBuilder.buildViewModel()
+		viewName = "subscriptions/plans"
+		if req.query.v?
+			viewName = "#{viewName}_#{req.query.v}"
+		logger.log viewName:viewName, "showing plans page"
+		currentUser = null
+
+		GeoIpLookup.getCurrencyCode req.query?.ip || req.ip, (err, recomendedCurrency)->
+			return next(err) if err?
+			render = () ->
+				res.render viewName,
+					title: "plans_and_pricing"
+					plans: plans
+					gaExperiments: Settings.gaExperiments.plansPage
+					recomendedCurrency:recomendedCurrency
+					planFeatures: planFeatures
+			user_id = AuthenticationController.getLoggedInUserId(req)
+			if user_id?
+				UserGetter.getUser user_id, {signUpDate: 1}, (err, user) ->
+					return next(err) if err?
+					currentUser = user
 					render()
 					render()
+			else
+				render()
 
 
 	#get to show the recurly.js page
 	#get to show the recurly.js page
 	paymentPage: (req, res, next) ->
 	paymentPage: (req, res, next) ->

+ 4 - 13
services/web/app/views/subscriptions/_plans_faq.pug

@@ -16,18 +16,12 @@
 			p #{translate('faq_do_collab_need_premium_answer')}
 			p #{translate('faq_do_collab_need_premium_answer')}
 		.col-md-6
 		.col-md-6
 			h3 #{translate('faq_need_more_collab_question')}
 			h3 #{translate('faq_need_more_collab_question')}
-			if settings.overleaf
-				p !{translate('faq_need_more_collab_answer', { referFriendsLink: translate('referring_your_friends') })}
-			else
-				p !{translate('faq_need_more_collab_answer', { referFriendsLink: '<a href="/user/bonus">' + translate('referring_your_friends') + '</a>'})}
+			p !{translate('faq_need_more_collab_answer', { referFriendsLink: translate('referring_your_friends') })}
 	.row
 	.row
 		.col-md-6
 		.col-md-6
 			h3 #{translate('faq_purchase_more_licenses_question')}
 			h3 #{translate('faq_purchase_more_licenses_question')}
-			if settings.overleaf
-				p !{translate('faq_purchase_more_licenses_answer', { groupLink: translate('discounted_group_accounts') })}&nbsp;
-					a(href, ng-click="openGroupPlanModal()") #{translate("get_in_touch_for_details")}
-			else
-				p !{translate('faq_purchase_more_licenses_answer', { groupLink: '<a href="/i/university/groups">' + translate('discounted_group_accounts') + '</a>' })}
+			p !{translate('faq_purchase_more_licenses_answer', { groupLink: translate('discounted_group_accounts') })}&nbsp;
+				a(href, ng-click="openGroupPlanModal()") #{translate("get_in_touch_for_details")}
 		.col-md-6
 		.col-md-6
 			h3 #{translate('faq_monthly_or_annual_question')}
 			h3 #{translate('faq_monthly_or_annual_question')}
 			p #{translate('faq_monthly_or_annual_answer')}
 			p #{translate('faq_monthly_or_annual_answer')}
@@ -37,7 +31,4 @@
 			p #{translate('faq_how_to_pay_answer')}
 			p #{translate('faq_how_to_pay_answer')}
 		.col-md-6
 		.col-md-6
 			h3 #{translate('faq_pay_by_invoice_question')}
 			h3 #{translate('faq_pay_by_invoice_question')}
-			if settings.overleaf
-				p !{translate('faq_pay_by_invoice_answer', { groupLink: translate('discounted_group_accounts') })}
-			else
-				p !{translate('faq_pay_by_invoice_answer', { groupLink: '<a href="/i/university/groups">' + translate('discounted_group_accounts') + '</a>' })}
+			p !{translate('faq_pay_by_invoice_answer', { groupLink: translate('discounted_group_accounts') })}

+ 5 - 10
services/web/app/views/subscriptions/_plans_page_mixins.pug

@@ -1,23 +1,20 @@
 //- Buy Buttons
 //- Buy Buttons
 mixin btn_buy_collaborator(location)
 mixin btn_buy_collaborator(location)
-	a.btn(
-		class=settings.overleaf ? 'btn-primary' : 'btn-info'
+	a.btn.btn-primary(
 		ng-href="/user/subscription/new?planCode={{ getCollaboratorPlanCode() }}&currency={{currencyCode}}",
 		ng-href="/user/subscription/new?planCode={{ getCollaboratorPlanCode() }}&currency={{currencyCode}}",
 		ng-click="signUpNowClicked('collaborator','" + location + "')"
 		ng-click="signUpNowClicked('collaborator','" + location + "')"
 	)
 	)
 		span(ng-show="ui.view != 'annual'") #{translate("start_free_trial")}
 		span(ng-show="ui.view != 'annual'") #{translate("start_free_trial")}
 		span(ng-show="ui.view == 'annual'") #{translate("buy_now")}
 		span(ng-show="ui.view == 'annual'") #{translate("buy_now")}
 mixin btn_buy_free(location)
 mixin btn_buy_free(location)
-	a.btn(
-		class=settings.overleaf ? 'btn-primary' : 'btn-info'
+	a.btn.btn-primary(
 		href="/register"
 		href="/register"
 		style=(getLoggedInUserId() === null ? "" : "visibility: hidden")
 		style=(getLoggedInUserId() === null ? "" : "visibility: hidden")
 		ng-click="signUpNowClicked('free','" + location + "')"
 		ng-click="signUpNowClicked('free','" + location + "')"
 	)
 	)
 		span.text-capitalize #{translate('get_started_now')}
 		span.text-capitalize #{translate('get_started_now')}
 mixin btn_buy_professional(location)
 mixin btn_buy_professional(location)
-	a.btn(
-		class=settings.overleaf ? 'btn-primary' : 'btn-info'
+	a.btn.btn-primary(
 		ng-href="/user/subscription/new?planCode=professional{{ ui.view == 'annual' && '-annual' || planQueryString}}&currency={{currencyCode}}"
 		ng-href="/user/subscription/new?planCode=professional{{ ui.view == 'annual' && '-annual' || planQueryString}}&currency={{currencyCode}}"
 		ng-click="signUpNowClicked('professional','" + location + "')"
 		ng-click="signUpNowClicked('professional','" + location + "')"
 	)
 	)
@@ -25,15 +22,13 @@ mixin btn_buy_professional(location)
 		span(ng-show="ui.view == 'annual'") #{translate("buy_now")}
 		span(ng-show="ui.view == 'annual'") #{translate("buy_now")}
 mixin btn_buy_student(location, plan)
 mixin btn_buy_student(location, plan)
 	if plan == 'annual'
 	if plan == 'annual'
-		a.btn(
-			class=settings.overleaf ? 'btn-primary' : 'btn-info'
+		a.btn.btn-primary(
 			ng-href="/user/subscription/new?planCode=student-annual&currency={{currencyCode}}",
 			ng-href="/user/subscription/new?planCode=student-annual&currency={{currencyCode}}",
 			ng-click="signUpNowClicked('student-annual','" + location + "')"
 			ng-click="signUpNowClicked('student-annual','" + location + "')"
 		) #{translate("buy_now")}
 		) #{translate("buy_now")}
 	else
 	else
 		//- planQueryString will contain _free_trial_7_days
 		//- planQueryString will contain _free_trial_7_days
-		a.btn(
-			class=settings.overleaf ? 'btn-primary' : 'btn-info'
+		a.btn.btn-primary(
 			ng-href="/user/subscription/new?planCode=student{{planQueryString}}&currency={{currencyCode}}",
 			ng-href="/user/subscription/new?planCode=student{{planQueryString}}&currency={{currencyCode}}",
 			ng-click="signUpNowClicked('student-monthly','" + location + "')"
 			ng-click="signUpNowClicked('student-monthly','" + location + "')"
 		) #{translate("start_free_trial")}
 		) #{translate("start_free_trial")}

+ 6 - 6
services/web/app/views/subscriptions/_plans_quotes.pug

@@ -8,18 +8,18 @@
 			.row
 			.row
 				.col-md-3
 				.col-md-3
 					.circle-img
 					.circle-img
-						img(src=buildImgPath('advocates/erdogmus.jpg') alt="Professor Erdogmus")
+						img(src=buildImgPath('advocates/schultz.jpg') alt="Kevin Schultz")
 				.col-md-9
 				.col-md-9
 					blockquote
 					blockquote
-						p The ability to track changes and the real-time collaborative nature is what sets ShareLaTeX apart.
-						footer Professor Erdogmus, Northeastern University
+						p It is the ability to collaborate very easily that drew me to Overleaf.
+						footer Kevin Schultz, Assistant Professor of Physics, Hartwick College
 	.col-md-6
 	.col-md-6
 		div
 		div
 			.row
 			.row
 				.col-md-3
 				.col-md-3
 					.circle-img
 					.circle-img
-						img(src=buildImgPath('advocates/henderson.jpg') alt="Rob Henderson")
+						img(src=buildImgPath('advocates/dagoret-campagne.jpg') alt="Dr Sylvie Dagoret-Campagne")
 				.col-md-9
 				.col-md-9
 					blockquote
 					blockquote
-						p ShareLaTeX has proven to be a powerful and robust collaboration tool that is widely used in our School.
-						footer Rob Henderson, School Of Informatics And Computing - Indiana University
+						p Overleaf is a great educational tool for publishing scientific documents.
+						footer Dr Sylvie Dagoret-Campagne, Director of Research at CNRS, University of Paris-Saclay

+ 1 - 16
services/web/app/views/subscriptions/new.pug

@@ -14,7 +14,7 @@ block content
 		.container(ng-controller="NewSubscriptionController" ng-cloak)
 		.container(ng-controller="NewSubscriptionController" ng-cloak)
 			.row.card-group
 			.row.card-group
 				.col-md-5.col-md-push-4
 				.col-md-5.col-md-push-4
-					.card.card-highlighted(class=settings.overleaf ? 'card-border' : '')
+					.card.card-highlighted.card-border
 						.page-header
 						.page-header
 							.row
 							.row
 								.col-xs-9
 								.col-xs-9
@@ -37,14 +37,6 @@ block content
 								.col-xs-12
 								.col-xs-12
 									p.student-disclaimer #{translate('student_disclaimer')}
 									p.student-disclaimer #{translate('student_disclaimer')}
 
 
-							if plan_code == 'collaborator_free_trial_7_days' && !!settings.overleaf
-								.row
-									.col-xs-12
-										p.small.row-spaced-small
-											| The <strong>Collaborator</strong> plan is a new Overleaf v2 plan which includes track-changes, references search, and Dropbox &amp; GitHub integration. While Overleaf v2 is in beta, you can also still subscribe to a
-											|
-											a(href=settings.overleaf.host + "/plans") legacy plan in Overleaf v1
-											| .
 							hr.thin
 							hr.thin
 							.row
 							.row
 								.col-md-12.text-center
 								.col-md-12.text-center
@@ -250,13 +242,6 @@ block content
 							hr
 							hr
 								
 								
 							p.small.text-center We're confident that you'll love #{settings.appName}, but if not you can cancel anytime. We'll give you your money back, no questions asked, if you let us know within 30 days.
 							p.small.text-center We're confident that you'll love #{settings.appName}, but if not you can cancel anytime. We'll give you your money back, no questions asked, if you let us know within 30 days.
-							if !settings.overleaf
-								hr
-								span &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;
-								a(href="https://www.positivessl.com" style="font-family: arial; font-size: 10px; color: #212121; text-decoration: none;")
-									img(src="https://www.positivessl.com/images-new/PositiveSSL_tl_trans.png" alt="SSL Certificate" title="SSL Certificate" border="0")
-									div(style="font-family: arial;font-weight:bold;font-size:15px;color:#86BEE0;")
-										a(href="https://www.positivessl.com" style="color:#86BEE0; text-decoration: none;")
 
 
 
 
 	script(type="text/javascript").
 	script(type="text/javascript").

+ 6 - 11
services/web/app/views/subscriptions/plans.pug

@@ -89,13 +89,10 @@ block content
 							span #{translate('reduce_costs_group_licenses')}
 							span #{translate('reduce_costs_group_licenses')}
 							br
 							br
 							br
 							br
-							if settings.overleaf
-								a.btn.btn-default(
-									href
-									ng-click="openGroupPlanModal()"
-								) #{translate('find_out_more')}
-							else
-								a.btn.btn-info(href="/i/university/groups") #{translate('find_out_more')}
+							a.btn.btn-default(
+								href
+								ng-click="openGroupPlanModal()"
+							) #{translate('find_out_more')}
 
 
 				div
 				div
 					.row.row-spaced-large
 					.row.row-spaced-large
@@ -113,8 +110,7 @@ block content
 						.col-sm-12(ng-if="ui.view == 'student'")
 						.col-sm-12(ng-if="ui.view == 'student'")
 							+table_student
 							+table_student
 
 
-					if !settings.overleaf
-						include _plans_quotes
+					include _plans_quotes
 
 
 					include _plans_faq
 					include _plans_faq
 
 
@@ -122,8 +118,7 @@ block content
 						.col-md-12
 						.col-md-12
 							.plans-header.plans-subheader.text-centered
 							.plans-header.plans-subheader.text-centered
 								h2 #{translate('still_have_questions')}
 								h2 #{translate('still_have_questions')}
-									button.btn.btn-header.text-capitalize(
-										class=settings.overleaf ? 'btn-default' : 'btn-info'
+									button.btn.btn-default.btn-header.text-capitalize(
 										ng-controller="ContactGeneralModal"
 										ng-controller="ContactGeneralModal"
 										ng-click="openModal()"
 										ng-click="openModal()"
 									) #{translate('get_in_touch')}
 									) #{translate('get_in_touch')}

BIN
services/web/public/img/advocates/dagoret-campagne.jpg


BIN
services/web/public/img/advocates/schultz.jpg