-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
247 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<% if @user.plan.stripe_id == "free" %> | ||
<%= render partial: 'shared/billing/plan_free' %> | ||
<% elsif @user.plan.stripe_id == "timed" %> | ||
<%= render partial: 'shared/billing/plan_timed' %> | ||
<% else %> | ||
<%= render partial: 'shared/billing/plan_default' %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<div class="inset-content"> | ||
<h4 class="group-header">Payment History</h4> | ||
</div> | ||
<div class="control-group"> | ||
<table class="table table-rounded"> | ||
<% if @next_payment_date %> | ||
<tr> | ||
<td><time datetime="<%= @next_payment_date.to_s(:date) %>"><%= @next_payment_date.to_s(:date) %></time></td> | ||
<td> </td> | ||
<td><span class="extra-muted">Scheduled</span></td> | ||
</tr> | ||
<% end %> | ||
<% @billing_events.each do |invoice| %> | ||
<tr> | ||
<td><%= invoice.receipt_date %></td> | ||
<td><%= number_to_currency(invoice.receipt_amount) %> <%= invoice.currency %> <%= invoice.receipt_description %></td> | ||
<td><%= link_to 'Receipt', invoice %></td> | ||
</tr> | ||
<% end %> | ||
</table> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<div class="inset"> | ||
<%= form_tag settings_update_credit_card_path, id: "payment-form" do %> | ||
<%= hidden_field_tag :stripe_token, nil, id: 'stripe_token' %> | ||
<div class="inset-content"> | ||
<h4 class="group-header">Billing Info</h4> | ||
</div> | ||
<ul class="pill-list"> | ||
<li class="text-with-accessory"> | ||
<span data-behavior="billing_details" class="text">Loading…</span> | ||
<button class="button-text accessory" data-behavior="show_container" data-target="credit_card_form">Update card</button> | ||
</li> | ||
</ul> | ||
|
||
<div class="hide" data-container="credit_card_form"> | ||
<%= render partial: 'shared/credit_card_form' %> | ||
<div class="description-inset"> | ||
<div class="button-wrap"> | ||
<%= submit_tag "Update", class: "button no-margin update-cc-button", id: "credit_card_button", disabled: true, data: { disable_with: false } %> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<% end %> | ||
</div> | ||
<div class="inset"> | ||
<div class="inset-content"> | ||
<h4 class="group-header">Change Your Plan</h4> | ||
</div> | ||
<div class="control-group"> | ||
<table class="table table-rounded" style="margin-bottom: 0;"> | ||
<% @plans.each do |plan| %> | ||
<tr> | ||
<td><%= plan.name %></td> | ||
<td><%= number_to_currency(plan.price, precision: 0) %>/<%= plan.period %></td> | ||
<td> | ||
<% if @user.plan.id == plan.id %> | ||
Your plan | ||
<% else %> | ||
<%= form_tag settings_update_plan_path, data: { behavior: 'change_plan' }, class: 'no-margin' do %> | ||
<%= hidden_field_tag 'plan', plan.id %> | ||
<%= button_tag 'Switch to this plan', class: 'button-text', data: { confirm: "Are you sure you want to switch to #{plan.name.downcase} billing?" } %> | ||
<% end %> | ||
<% end %> | ||
</td> | ||
</tr> | ||
<% end %> | ||
</table> | ||
</div> | ||
<p class="control-group-description">Plan changes are pro-rated.</p> | ||
<%= render partial: 'shared/billing/payment_history' %> | ||
</div> | ||
|
||
<%= render partial: 'shared/billing/receipt_info' %> |
Oops, something went wrong.