<div id="c-user-upgrades">
  <div id="a-new">
    <h1>Upgrade Account</h1>

    <% unless params[:user_id] %>
      <p class="copy">Want more searching power? Upgrade your account and become a power user of the best database of anime artwork on the internet.</p>

      <div id="feature-comparison">
        <table>
          <thead>
            <tr>
              <th></th>
              <th>Basic</th>
              <th>Gold</th>
              <th>Platinum</th>
            </tr>
          </thead>
          <tbody>
            <colgroup id="labels"></colgroup>
            <colgroup id="basic"></colgroup>
            <colgroup id="gold"></colgroup>
            <colgroup id="platinum"></colgroup>
            <tr>
              <td>Cost</td>
              <td>Free</td>
              <td>$20<p class="cost-footnote">One time fee</p></td>
              <td>$40<p class="cost-footnote">One time fee</p></td>
            </tr>
            <tr>
              <td>Tag Limit</td>
              <td>2</td>
              <td><%= Danbooru.config.base_tag_query_limit %></td>
              <td><%= Danbooru.config.base_tag_query_limit*2 %></td>
            </tr>
            <tr>
              <td>Favorite Limit</td>
              <td>10,000</td>
              <td>20,000</td>
              <td>Unlimited</td>
            </tr>
            <tr>
              <td>Favorite Groups</td>
              <td>3</td>
              <td>5</td>
              <td>10</td>
            </tr>
            <tr>
              <td>Page Limit</td>
              <td>1,000</td>
              <td>2,000</td>
              <td>5,000</td>
            </tr>
            <tr>
              <td>Saved Searches</td>
              <td>250</td>
              <td>250</td>
              <td>1,000</td>
            </tr>
            <tr>
              <td>See Censored Tags</td>
              <td>No</td>
              <td>Yes</td>
              <td>Yes</td>
            </tr>
            <tr>
              <td>Max API Requests Per Second</td>
              <td>15</td>
              <td>30</td>
              <td>60</td>
            </tr>
            <tr>
              <td>API Regen Per Second</td>
              <td>1</td>
              <td>2</td>
              <td>4</td>
            </tr>
            <tr>
              <td>Database Timeout</td>
              <td>3 sec</td>
              <td>6 sec</td>
              <td>9 sec</td>
            </tr>
            <tr>
              <td>Variable Posts Per Page</td>
              <td>No</td>
              <td>Yes</td>
              <td>Yes</td>
            </tr>
            <tr>
              <td>Name Changes</td>
              <td>No</td>
              <td>Yes</td>
              <td>Yes</td>
            </tr>
          </tbody>
        </table>
      </div>
    <% end %>

    <div class="section">
      <% if params[:user_id] %>
        <p>You are gifting this account upgrade to <%= link_to user.pretty_name, user_path(params[:user_id]) %>.</p>
      <% else %>
        <p>You can also upgrade someone else's account for the same price. The easiest way is to go to their profile page and look for a "Gift Upgrade" link.</p>
      <% end %>
    </div>

    <% if Danbooru.config.stripe_publishable_key %>
      <% if CurrentUser.safe_mode? %>
        <%= render "stripe_payment" %>
      <% else %>
        <%= render "stripe_payment_safebooru" %>
      <% end %>
    <% end %>
  </div>
</div>

<%= render "users/secondary_links" %>

<% content_for(:page_title) do %>
  Upgrade - <%= Danbooru.config.app_name %>
<% end %>
