dashboard.pug 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. extends ../layout
  2. include ./dashboard/_team_name_mixin
  3. block head-scripts
  4. script(type="text/javascript", nonce=scriptNonce, src="https://js.recurly.com/v4/recurly.js")
  5. block append meta
  6. meta(name="ol-managedInstitutions", data-type="json", content=managedInstitutions)
  7. meta(name="ol-planCodesChangingAtTermEnd", data-type="json", content=plans.planCodesChangingAtTermEnd)
  8. if (personalSubscription && personalSubscription.recurly)
  9. meta(name="ol-recurlyApiKey" content=settings.apis.recurly.publicKey)
  10. meta(name="ol-subscription" data-type="json" content=personalSubscription)
  11. meta(name="ol-recomendedCurrency" content=personalSubscription.recurly.currency)
  12. block content
  13. main.content.content-alt(ng-cloak)
  14. .container
  15. .row
  16. .col-md-8.col-md-offset-2
  17. if (fromPlansPage)
  18. .alert.alert-warning
  19. p You already have a subscription
  20. .card
  21. .page-header
  22. h1 #{translate("your_subscription")}
  23. -var hasDisplayedSubscription = false
  24. if (personalSubscription)
  25. -hasDisplayedSubscription = true
  26. include ./dashboard/_personal_subscription
  27. if (managedGroupSubscriptions && managedGroupSubscriptions.length > 0)
  28. include ./dashboard/_managed_groups
  29. if (managedInstitutions && managedInstitutions.length > 0)
  30. include ./dashboard/_managed_institutions
  31. if (managedPublishers && managedPublishers.length > 0)
  32. include ./dashboard/_managed_publishers
  33. if (memberGroupSubscriptions && memberGroupSubscriptions.length > 0)
  34. -hasDisplayedSubscription = true
  35. include ./dashboard/_group_memberships
  36. if (confirmedMemberAffiliations && confirmedMemberAffiliations.length > 0)
  37. include ./dashboard/_institution_memberships
  38. if (v1SubscriptionStatus)
  39. include ./dashboard/_v1_subscription_status
  40. if (!hasDisplayedSubscription)
  41. if (hasSubscription)
  42. -hasDisplayedSubscription = true
  43. p(ng-non-bindable) You're on an #{settings.appName} Paid plan. Contact
  44. a(href="mailto:support@overleaf.com") support@overleaf.com
  45. | to find out more.
  46. else
  47. if (subscriptionCopy === 'new')
  48. p(ng-non-bindable) You are on the #{settings.appName} Free plan. Upgrade to access these Premium Features:
  49. ul
  50. li Invite more collaborators
  51. for feature in ['realtime_track_changes', 'full_doc_history', 'reference_search', 'reference_sync', 'dropbox_integration_lowercase', 'github_integration_lowercase', 'priority_support']
  52. li #{translate(feature)}
  53. a(ng-controller="UpgradeSubscriptionController" href="/user/subscription/plans" ng-click="upgradeSubscription()").btn.btn-primary Upgrade now
  54. else
  55. p(ng-non-bindable) You're on the #{settings.appName} Free plan.
  56. |
  57. a(ng-controller="UpgradeSubscriptionController" href="/user/subscription/plans" ng-click="upgradeSubscription()").btn.btn-primary Upgrade now