mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
88 lines
3.3 KiB
Text
88 lines
3.3 KiB
Text
extends ../layout
|
|
|
|
|
|
|
|
mixin printPlan(plan)
|
|
-if (!plan.hideFromUsers)
|
|
tr
|
|
td
|
|
strong #{plan.name}
|
|
td
|
|
-if (plan.annual)
|
|
| $#{plan.price / 100} / #{translate("year")}
|
|
-else
|
|
| $#{plan.price / 100} / #{translate("month")}
|
|
td
|
|
-if (subscription.state == "free-trial")
|
|
a(href="/user/subscription/new?planCode=#{plan.planCode}").btn.btn-success #{translate("subscribe_to_this_plan")}
|
|
-else if (plan.planCode == subscription.planCode)
|
|
button.btn.disabled #{translate("your_plan")}
|
|
-else
|
|
form(action="/user/subscription/update",method="post")
|
|
input(type="hidden", name="_csrf", value=csrfToken)
|
|
input(type="hidden",name="plan_code",value="#{plan.planCode}")
|
|
input(type="submit",value="Change to this plan").btn.btn-success
|
|
|
|
mixin printPlans(plans)
|
|
-each plan in plans
|
|
mixin printPlan(plan)
|
|
|
|
block content
|
|
.content.content-alt
|
|
.container
|
|
.row
|
|
.col-md-8.col-md-offset-2
|
|
.card
|
|
.page-header
|
|
h1 #{translate("your_subscription")}
|
|
case subscription.state
|
|
when "free-trial"
|
|
p #{translate("on_free_trial_expiring_at", {expiresAt:"<strong>#{subscription.expiresAt}</strong>"})}
|
|
p #{translate("choose_a_plan_below")}
|
|
when "active"
|
|
p #{translate("currently_subscribed_to_plan", {planName:"<strong>#{subscription.name}</strong>"})}
|
|
a(href, ng-click="changePlan = true") #{translate("change_plan")}.
|
|
p #{translate("next_payment_of_x_collectected_on_y", {paymentAmmount:"<strong>#{subscription.price}</strong>", collectionDate:"<strong>#{subscription.nextPaymentDueAt}</strong>"})}
|
|
p.pull-right
|
|
|
|
p: form(action="/user/subscription/cancel",method="post")
|
|
input(type="hidden", name="_csrf", value=csrfToken)
|
|
a(href="/user/subscription/billing-details/edit").btn.btn-info #{translate("update_your_billing_details")}
|
|
|
|
|
input(type="submit", value="Cancel your subscription").btn.btn-primary#cancelSubscription
|
|
when "canceled"
|
|
p #{translate("currently_subscribed_to_plan", {planName:"<strong>#{subscription.name}</strong>"})}
|
|
p #{translate("subscription_canceled_and_terminate_on_x", {terminateDate:"<strong>#{subscription.nextPaymentDueAt}</strong>"})}
|
|
p: form(action="/user/subscription/reactivate",method="post")
|
|
input(type="hidden", name="_csrf", value=csrfToken)
|
|
input(type="submit",value="Reactivate your subscription").btn.btn-success
|
|
when "expired"
|
|
p #{translate("your_subscription_has_expired")}
|
|
a(href="/user/subscription/plans") #{translate("create_new_subscription")}
|
|
default
|
|
p #{translate("problem_with_subscription_contact_us")}
|
|
|
|
-if(subscription.groupPlan)
|
|
a(href="/subscription/group").btn.btn-success #{translate("manage_group")}
|
|
|
|
div(ng-show="changePlan", ng-cloak)
|
|
hr
|
|
h2 #{translate("change_plan")}
|
|
p: table.table
|
|
tr
|
|
th #{translate("name")}
|
|
th #{translate("price")}
|
|
th
|
|
mixin printPlans(plans.studentAccounts)
|
|
mixin printPlans(plans.individualMonthlyPlans)
|
|
mixin printPlans(plans.individualAnnualPlans)
|
|
|
|
|
|
script(type="text/javascript").
|
|
$('#cancelSubscription').on("click", function() {
|
|
ga('send', 'event', 'subscription-funnel', 'cancelation')
|
|
})
|
|
|
|
|
|
|
|
|