added 20% off option

This commit is contained in:
Henry Oswald
2015-11-16 15:52:47 +00:00
parent 89381e84eb
commit f7854649e2
3 changed files with 41 additions and 14 deletions
@@ -4,27 +4,52 @@ div#trackChanges(ng-show="ui.view == 'track-changes'")
.upgrade-prompt(ng-show="!project.features.versioning")
.message(ng-show="project.owner._id == user.id")
p #{translate("need_to_upgrade_for_history")}
p #{translate("upgrade_to_get_feature", {feature:"Entire Doc History"})}
p.small(ng-show="startedFreeTrial") #{translate("refresh_page_after_starting_free_trial")}
h4
i.fa.fa-check  
| #{translate("unlimited_projects")}
h4
i.fa.fa-check  
| #{translate("collabs_per_proj", {collabcount:'Multiple'})}
h4
i.fa.fa-check  
| #{translate("full_doc_history")}
h4
i.fa.fa-check  
| #{translate("sync_to_dropbox")}
h4
i.fa.fa-check  
| #{translate("sync_to_github")}
h4
i.fa.fa-check  
|#{translate("compile_larger_projects")}
p(ng-controller="FreeTrialModalController")
a.btn(
a.btn.btn-success(
href
ng-class="buttonClass"
sixpack-convert="track_changes_feature_info"
sixpack-convert="track_changes_discount"
ng-click="startFreeTrial('track-changes')"
) #{translate("start_free_trial")}
|    
a.small(href, ng-click="toggleTrackChanges()") #{translate("cancel")}
p.small(ng-show="startedFreeTrial") #{translate("refresh_page_after_starting_free_trial")}
.message(ng-show="project.owner._id != user.id")
p #{translate("ask_proj_owner_to_upgrade_for_history")}
p
a.small(href, ng-click="toggleTrackChanges()") #{translate("cancel")}
.upgrade-prompt(ng-show="!project.features.versioning", ng-if="versioningPopupType == 'longform'")
.upgrade-prompt(ng-show="!project.features.versioning", ng-if="versioningPopupType == 'discount'")
.message(ng-show="project.owner._id == user.id")
p #{translate("upgrade_to_get_feature, plus:", {feature:"Entire Doc History"}}
p #{translate("upgrade_to_get_feature", {feature:"Entire Doc History"})}
h2(style="color:#a93529;") 20% Off First 6 Months!
p.small(ng-show="startedFreeTrial") #{translate("refresh_page_after_starting_free_trial")}
h4
i.fa.fa-check  
@@ -49,13 +74,12 @@ div#trackChanges(ng-show="ui.view == 'track-changes'")
h4
i.fa.fa-check  
|#{translate("compile_larger_projects")}
p(ng-controller="FreeTrialModalController")
a.btn.btn-success(
href
ng-class="buttonClass"
sixpack-convert="track_changes_feature_info"
ng-click="startFreeTrial('track-changes')"
sixpack-convert="track_changes_discount"
ng-click="startFreeTrial('track-changes', 'cf3yutfzu7ztxz')"
) #{translate("start_free_trial")}
@@ -8,7 +8,7 @@ define [
if $scope.project?.features?.versioning
$scope.versioningPopupType = "default"
else if $scope.ui.view == "track-changes"
sixpack.participate 'track_changes_feature_info', ['default', 'longform'], (chosenVariation, rawResponse)->
sixpack.participate 'track_changes_discount', ['default', 'discount'], (chosenVariation, rawResponse)->
$scope.versioningPopupType = chosenVariation
App.controller "TrackChangesListController", ["$scope", "ide", ($scope, ide) ->
@@ -5,7 +5,7 @@ define [
$scope.buttonClass = "btn-primary"
$scope.startFreeTrial = (source) ->
$scope.startFreeTrial = (source, couponCode) ->
testBuckets = [
{ bucketName:"student_control", planName:"student"}
@@ -15,5 +15,8 @@ define [
editorPlanBucket = abTestManager.getABTestBucket "editor_plan", testBuckets
abTestManager.processTestWithStep("editor_plan", editorPlanBucket.bucketName, 0)
ga?('send', 'event', 'subscription-funnel', 'upgraded-free-trial', source)
window.open("/user/subscription/new?planCode=#{editorPlanBucket.planName}_free_trial_7_days&ssp=#{editorPlanBucket.planName == 'collaborator'}")
url = "/user/subscription/new?planCode=#{editorPlanBucket.planName}_free_trial_7_days&ssp=#{editorPlanBucket.planName == 'collaborator'}"
if couponCode?
url = "#{url}&cc=#{couponCode}&scf=true"
window.open(url)
$scope.startedFreeTrial = true