user upgrades: factor out gold/platinum prices.
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
<p>You can pay with a credit or debit card. Safebooru uses <a href="https://www.stripe.com">Stripe</a> as a payment intermediary so none of your personal information will be stored on the site.</p>
|
||||
|
||||
<% if user.level < User::Levels::GOLD %>
|
||||
<%= stripe_button("Upgrade to Gold", 2000, user) %>
|
||||
<%= stripe_button("Upgrade to Platinum", 4000, user) %>
|
||||
<%= stripe_button("Upgrade to Gold", UserUpgrade.gold_price, user) %>
|
||||
<%= stripe_button("Upgrade to Platinum", UserUpgrade.platinum_price, user) %>
|
||||
<% elsif user.level < User::Levels::PLATINUM %>
|
||||
<%= stripe_button("Upgrade Gold to Platinum", 2000, user) %>
|
||||
<%= stripe_button("Upgrade Gold to Platinum", UserUpgrade.upgrade_price, user) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -23,8 +23,14 @@
|
||||
<tr>
|
||||
<td>Cost</td>
|
||||
<td>Free</td>
|
||||
<td>$20<div class="fineprint">One time fee</div></td>
|
||||
<td>$40<div class="fineprint">One time fee</div></td>
|
||||
<td>
|
||||
<%= cents_to_usd(UserUpgrade.gold_price) %>
|
||||
<div class="fineprint">One time fee</div>
|
||||
</td>
|
||||
<td>
|
||||
<%= cents_to_usd(UserUpgrade.platinum_price) %>
|
||||
<div class="fineprint">One time fee</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tag Limit</td>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="notice notice-info notice-large" id="upgrade-account-notice">
|
||||
<h2><%= link_to "Upgrade your account for only $20!", new_user_upgrade_path, id: "goto-upgrade-account" %></h2>
|
||||
<h2><%= link_to "Upgrade your account for only #{cents_to_usd(UserUpgrade.gold_price)}!", new_user_upgrade_path, id: "goto-upgrade-account" %></h2>
|
||||
<div><%= link_to "No thanks", "#", id: "hide-upgrade-account-notice" %></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user