2013-10-02 18:50:02 +00:00
|
|
|
<div class="container user-admin">
|
2013-10-02 06:05:53 +00:00
|
|
|
<div class="loading" ng-show="planLoading || planChanging">
|
2013-10-03 16:27:39 +00:00
|
|
|
<i class="icon-spinner icon-spin icon-3x"></i>
|
2013-10-02 06:05:53 +00:00
|
|
|
</div>
|
2013-10-02 05:40:11 +00:00
|
|
|
<div class="row" ng-show="errorMessage">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="alert alert-danger">{{ errorMessage }}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row" ng-hide="planLoading">
|
2013-10-02 04:48:03 +00:00
|
|
|
<div class="col-md-4" ng-repeat='plan in plans'>
|
|
|
|
<div class="panel" ng-class="{'panel-success': subscription.plan == plan.stripeId, 'panel-default': subscription.plan != plan.stripeId}">
|
|
|
|
<div class="panel-heading">
|
2013-10-03 16:27:39 +00:00
|
|
|
{{ plan.title }}
|
2013-10-02 04:48:03 +00:00
|
|
|
<span class="pull-right" ng-show="subscription.plan == plan.stripeId">
|
|
|
|
<i class="icon-ok"></i>
|
|
|
|
Subscribed
|
|
|
|
</span>
|
|
|
|
</div>
|
2013-10-02 18:50:02 +00:00
|
|
|
<div class="panel-body panel-plan">
|
2013-10-02 22:14:51 +00:00
|
|
|
<div class="plan-price">${{ plan.price / 100 }}</div>
|
2013-10-02 18:50:02 +00:00
|
|
|
<div class="plan-description"><b>{{ plan.privateRepos }}</b> Private Repositories</div>
|
2013-10-02 04:48:03 +00:00
|
|
|
<button class="btn btn-primary" ng-hide="subscription" ng-click="subscribe(plan.stripeId)">Subscribe</button>
|
2013-10-02 06:05:53 +00:00
|
|
|
<button class="btn" ng-show="subscription && (subscription.plan != plan.stripeId)" ng-click="changeSubscription(plan.stripeId)">Change</button>
|
2013-10-03 16:27:39 +00:00
|
|
|
<button class="btn btn-danger" ng-show="subscription.plan == plan.stripeId" ng-click="cancelSubscription()">Cancel</button>
|
2013-10-02 04:48:03 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2013-10-02 06:05:53 +00:00
|
|
|
<div class="row" ng-show="subscription">
|
2013-10-02 05:40:11 +00:00
|
|
|
<div class="col-md-6">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
Plan Usage
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
2013-10-03 16:27:39 +00:00
|
|
|
<div class="used-description">
|
2013-10-02 18:50:02 +00:00
|
|
|
<b>{{ subscription.usedPrivateRepos }}</b> of <b>{{ subscribedPlan.privateRepos }}</b> private repositories used
|
2013-10-03 16:27:39 +00:00
|
|
|
</div>
|
2013-10-02 05:40:11 +00:00
|
|
|
<div class="progress">
|
2013-10-02 18:50:02 +00:00
|
|
|
<div ng-class="'progress-bar ' + (planUsagePercent > 90 ? 'progress-bar-danger' : '')" role="progressbar" aria-valuenow="{{ subscription.usedPrivateRepos }}" aria-valuemin="0" aria-valuemax="{{ subscribedPlan.privateRepos }}" style="width: {{ planUsagePercent }}%;">
|
2013-10-02 05:40:11 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2013-10-02 18:50:02 +00:00
|
|
|
</div>
|