_plans_page_mixins.pug 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. //- Buy Buttons
  2. mixin btn_buy_collaborator(location)
  3. a.btn.btn-info(
  4. ng-href="/user/subscription/new?planCode={{ getCollaboratorPlanCode() }}&currency={{currencyCode}}",
  5. ng-click="signUpNowClicked('collaborator','" + location + "')"
  6. )
  7. span(ng-show="ui.view != 'annual'") #{translate("start_free_trial")}
  8. span(ng-show="ui.view == 'annual'") #{translate("buy_now")}
  9. mixin btn_buy_free(location)
  10. a.btn.btn-info(
  11. href="/register"
  12. style=(getLoggedInUserId() === null ? "" : "visibility: hidden")
  13. ng-click="signUpNowClicked('free','" + location + "')"
  14. )
  15. span(ng-if="plansVariant !== 'more-details'") #{translate('sign_up_now')}
  16. span.text-capitalize(ng-if="plansVariant === 'more-details'") #{translate('get_started_now')}
  17. mixin btn_buy_professional(location)
  18. a.btn.btn-info(
  19. ng-href="/user/subscription/new?planCode=professional{{ ui.view == 'annual' && '-annual' || planQueryString}}&currency={{currencyCode}}"
  20. ng-click="signUpNowClicked('professional','" + location + "')"
  21. )
  22. span(ng-show="ui.view != 'annual'") #{translate("start_free_trial")}
  23. span(ng-show="ui.view == 'annual'") #{translate("buy_now")}
  24. mixin btn_buy_student(location, plan)
  25. if plan == 'annual'
  26. a.btn.btn-info(
  27. ng-href="/user/subscription/new?planCode=student-annual&currency={{currencyCode}}",
  28. ng-click="signUpNowClicked('student-annual','" + location + "')"
  29. ) #{translate("buy_now")}
  30. else
  31. //- planQueryString will contain _free_trial_7_days
  32. a.btn.btn-info(
  33. ng-href="/user/subscription/new?planCode=student{{planQueryString}}&currency={{currencyCode}}",
  34. ng-click="signUpNowClicked('student-monthly','" + location + "')"
  35. ) #{translate("start_free_trial")}
  36. //- Cards
  37. mixin card_student_annual
  38. .best-value(ng-if="plansVariant == 'more-details'")
  39. strong #{translate('best_value')}
  40. .card-header
  41. h2 #{translate("student")} (#{translate("annual")})
  42. h5.tagline(ng-if="plansVariant == 'more-details'") #{translate('tagline_student_annual')}
  43. .circle
  44. span
  45. +price_student_annual
  46. +features_student('card', 'annual')
  47. mixin card_student_monthly
  48. .card-header
  49. h2 #{translate("student")}
  50. h5.tagline(ng-if="plansVariant == 'more-details'") #{translate('tagline_student_monthly')}
  51. .circle
  52. span
  53. +price_student_monthly
  54. +features_student('card', 'monthly')
  55. //- Features Lists
  56. mixin features_collaborator
  57. ul.list-unstyled
  58. li
  59. strong #{translate("collabs_per_proj", {collabcount:10})}
  60. +features_premium
  61. li
  62. br
  63. +btn_buy_collaborator('card')
  64. mixin features_free
  65. ul.list-unstyled
  66. li #{translate("one_collaborator")}
  67. li(class="hidden-xs hidden-sm")  
  68. li(class="hidden-xs hidden-sm")  
  69. li(class="hidden-xs hidden-sm")  
  70. li(class="hidden-xs hidden-sm" ng-if="plansVariant === 'more-details'")  
  71. li(class="hidden-xs hidden-sm" ng-if="plansVariant === 'more-details'")  
  72. li(class="hidden-xs hidden-sm" ng-if="plansVariant === 'more-details'")  
  73. li
  74. br
  75. +btn_buy_free('card')
  76. mixin features_premium
  77. li(ng-if="plansVariant != 'more-details'") #{translate("full_doc_history")}
  78. li(ng-if="plansVariant != 'more-details'") #{translate("sync_to_dropbox")}
  79. li(ng-if="plansVariant != 'more-details'") #{translate("sync_to_github")}
  80. li(ng-if="plansVariant === 'more-details'")  
  81. li(ng-if="plansVariant === 'more-details'")
  82. strong #{translate('all_premium_features')}
  83. li(ng-if="plansVariant === 'more-details'") #{translate('sync_dropbox_github')}
  84. li(ng-if="plansVariant === 'more-details'") #{translate('full_doc_history')}
  85. li(ng-if="plansVariant === 'more-details'") #{translate('track_changes')}
  86. li(ng-if="plansVariant === 'more-details'") + #{translate('more').toLowerCase()}
  87. mixin features_professional
  88. ul.list-unstyled
  89. li
  90. strong #{translate("unlimited_collabs")}
  91. +features_premium
  92. li
  93. br
  94. +btn_buy_professional('card')
  95. mixin features_student(location, plan)
  96. ul.list-unstyled
  97. li
  98. strong #{translate("collabs_per_proj", {collabcount:6})}
  99. +features_premium
  100. li
  101. br
  102. +btn_buy_student(location, plan)
  103. //- Prices
  104. mixin price_collaborator
  105. span(ng-if="ui.view == 'monthly'")
  106. | {{plans[currencyCode]['collaborator']['monthly']}}
  107. span.small /mo
  108. span(ng-if="ui.view == 'annual'")
  109. | {{plans[currencyCode]['collaborator']['annual']}}
  110. span.small /yr
  111. mixin price_professional
  112. span(ng-if="ui.view == 'monthly'")
  113. | {{plans[currencyCode]['professional']['monthly']}}
  114. span.small /mo
  115. span(ng-if="ui.view == 'annual'")
  116. | {{plans[currencyCode]['professional']['annual']}}
  117. span.small /yr
  118. mixin price_student_annual
  119. | {{plans[currencyCode]['student']['annual']}}
  120. span.small /yr
  121. mixin price_student_monthly
  122. | {{plans[currencyCode]['student']['monthly']}}
  123. span.small /mo
  124. //- UI Control
  125. mixin currency_dropdown
  126. .dropdown.currency-dropdown(dropdown)
  127. a.btn.btn-default.dropdown-toggle(
  128. href="#",
  129. data-toggle="dropdown",
  130. dropdown-toggle
  131. )
  132. | {{currencyCode}} ({{plans[currencyCode]['symbol']}})
  133. span.caret
  134. ul.dropdown-menu.dropdown-menu-right.text-right(role="menu")
  135. li(ng-repeat="(currency, value) in plans")
  136. a(
  137. href="#",
  138. ng-click="changeCurreny($event, currency)"
  139. ) {{currency}} ({{value['symbol']}})
  140. mixin plan_switch(location)
  141. ul.nav.nav-pills
  142. li(ng-class="{'active': ui.view == 'monthly'}")
  143. a(
  144. href="#"
  145. ng-click="switchToMonthly($event,'" + location + "')"
  146. ) #{translate("monthly")}
  147. li(ng-class="{'active': ui.view == 'annual'}")
  148. a(
  149. href="#"
  150. ng-click="switchToAnnual($event,'" + location + "')"
  151. ) #{translate("annual")}
  152. li(ng-class="{'active': ui.view == 'student'}")
  153. a(
  154. href="#"
  155. ng-click="switchToStudent($event,'" + location + "')"
  156. ) #{translate("half_price_student")}