From 3f062ee60281c6440d9559770324a7d45b52fd14 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 19 Dec 2013 21:51:46 -0500 Subject: [PATCH] NOTE: The plans page is still broken - Change the subscribe method to allow for subscribing to the free plan, even when an org - Change the frontend to no longer have different plan groups - Change the frontend to display the proper plans (i.e. hide the deprecated plans unless it is the current plan, etc) --- endpoints/api.py | 4 +- static/directives/plan-manager.html | 9 +- static/js/app.js | 144 +++++++++++++++------------- static/js/controllers.js | 19 ++-- 4 files changed, 91 insertions(+), 85 deletions(-) diff --git a/endpoints/api.py b/endpoints/api.py index 7c03e39fe..256fec8a9 100644 --- a/endpoints/api.py +++ b/endpoints/api.py @@ -1540,7 +1540,7 @@ def subscribe(user, plan, token, require_business_plan): if not plan_found: abort(404) - if require_business_plan and not plan_found['bus_features']: + if require_business_plan and not plan_found['bus_features'] and not plan_found['price'] == 0: abort(404) private_repos = model.get_private_repo_count(user.username) @@ -1679,7 +1679,7 @@ def get_org_subscription(orgname): return jsonify(subscription_view(cus.subscription, private_repos)) return jsonify({ - 'plan': 'bus-free', + 'plan': 'free', 'usedPrivateRepos': private_repos, }) diff --git a/static/directives/plan-manager.html b/static/directives/plan-manager.html index 8ee324d20..41e07c4e0 100644 --- a/static/directives/plan-manager.html +++ b/static/directives/plan-manager.html @@ -32,14 +32,15 @@ - + {{ plan.title }} {{ plan.privateRepos }}
${{ plan.price / 100 }}
-
-
- +
+
+ Existing Plan