mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Merge pull request #880 from sharelatex/jel-v2-launch-plans
Launch v2 Plans Page
This commit is contained in:
@@ -15,33 +15,30 @@ planFeatures = require './planFeatures'
|
||||
module.exports = SubscriptionController =
|
||||
|
||||
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
|
||||
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
|
||||
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
|
||||
render()
|
||||
|
||||
#get to show the recurly.js page
|
||||
paymentPage: (req, res, next) ->
|
||||
|
||||
@@ -16,18 +16,12 @@
|
||||
p #{translate('faq_do_collab_need_premium_answer')}
|
||||
.col-md-6
|
||||
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
|
||||
.col-md-6
|
||||
h3 #{translate('faq_purchase_more_licenses_question')}
|
||||
if settings.overleaf
|
||||
p !{translate('faq_purchase_more_licenses_answer', { groupLink: translate('discounted_group_accounts') })}
|
||||
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') })}
|
||||
a(href, ng-click="openGroupPlanModal()") #{translate("get_in_touch_for_details")}
|
||||
.col-md-6
|
||||
h3 #{translate('faq_monthly_or_annual_question')}
|
||||
p #{translate('faq_monthly_or_annual_answer')}
|
||||
@@ -37,7 +31,4 @@
|
||||
p #{translate('faq_how_to_pay_answer')}
|
||||
.col-md-6
|
||||
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') })}
|
||||
@@ -1,23 +1,20 @@
|
||||
//- Buy Buttons
|
||||
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() }}¤cy={{currencyCode}}",
|
||||
ng-click="signUpNowClicked('collaborator','" + location + "')"
|
||||
)
|
||||
span(ng-show="ui.view != 'annual'") #{translate("start_free_trial")}
|
||||
span(ng-show="ui.view == 'annual'") #{translate("buy_now")}
|
||||
mixin btn_buy_free(location)
|
||||
a.btn(
|
||||
class=settings.overleaf ? 'btn-primary' : 'btn-info'
|
||||
a.btn.btn-primary(
|
||||
href="/register"
|
||||
style=(getLoggedInUserId() === null ? "" : "visibility: hidden")
|
||||
ng-click="signUpNowClicked('free','" + location + "')"
|
||||
)
|
||||
span.text-capitalize #{translate('get_started_now')}
|
||||
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}}¤cy={{currencyCode}}"
|
||||
ng-click="signUpNowClicked('professional','" + location + "')"
|
||||
)
|
||||
@@ -25,15 +22,13 @@ mixin btn_buy_professional(location)
|
||||
span(ng-show="ui.view == 'annual'") #{translate("buy_now")}
|
||||
mixin btn_buy_student(location, plan)
|
||||
if plan == 'annual'
|
||||
a.btn(
|
||||
class=settings.overleaf ? 'btn-primary' : 'btn-info'
|
||||
a.btn.btn-primary(
|
||||
ng-href="/user/subscription/new?planCode=student-annual¤cy={{currencyCode}}",
|
||||
ng-click="signUpNowClicked('student-annual','" + location + "')"
|
||||
) #{translate("buy_now")}
|
||||
else
|
||||
//- 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}}¤cy={{currencyCode}}",
|
||||
ng-click="signUpNowClicked('student-monthly','" + location + "')"
|
||||
) #{translate("start_free_trial")}
|
||||
|
||||
@@ -8,18 +8,18 @@
|
||||
.row
|
||||
.col-md-3
|
||||
.circle-img
|
||||
img(src=buildImgPath('advocates/erdogmus.jpg') alt="Professor Erdogmus")
|
||||
img(src=buildImgPath('advocates/schultz.jpg') alt="Kevin Schultz")
|
||||
.col-md-9
|
||||
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
|
||||
div
|
||||
.row
|
||||
.col-md-3
|
||||
.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
|
||||
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
|
||||
@@ -14,7 +14,7 @@ block content
|
||||
.container(ng-controller="NewSubscriptionController" ng-cloak)
|
||||
.row.card-group
|
||||
.col-md-5.col-md-push-4
|
||||
.card.card-highlighted(class=settings.overleaf ? 'card-border' : '')
|
||||
.card.card-highlighted.card-border
|
||||
.page-header
|
||||
.row
|
||||
.col-xs-9
|
||||
@@ -37,14 +37,6 @@ block content
|
||||
.col-xs-12
|
||||
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 & 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
|
||||
.row
|
||||
.col-md-12.text-center
|
||||
@@ -250,13 +242,6 @@ block content
|
||||
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.
|
||||
if !settings.overleaf
|
||||
hr
|
||||
span
|
||||
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").
|
||||
|
||||
@@ -89,13 +89,10 @@ block content
|
||||
span #{translate('reduce_costs_group_licenses')}
|
||||
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
|
||||
.row.row-spaced-large
|
||||
@@ -113,8 +110,7 @@ block content
|
||||
.col-sm-12(ng-if="ui.view == 'student'")
|
||||
+table_student
|
||||
|
||||
if !settings.overleaf
|
||||
include _plans_quotes
|
||||
include _plans_quotes
|
||||
|
||||
include _plans_faq
|
||||
|
||||
@@ -122,8 +118,7 @@ block content
|
||||
.col-md-12
|
||||
.plans-header.plans-subheader.text-centered
|
||||
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-click="openModal()"
|
||||
) #{translate('get_in_touch')}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
Reference in New Issue
Block a user