upgrades: show login and create account links for anon users.
This commit is contained in:
@@ -92,25 +92,39 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<% if @user_upgrade.purchaser.is_anonymous? %>
|
<td></td>
|
||||||
<td><%= link_to "Login", login_path(url: new_user_upgrade_path), class: "login-button button-primary" %></td>
|
<td>
|
||||||
<td><%= button_to "Get #{Danbooru.config.canonical_app_name} Gold", nil, class: "button-primary", disabled: true %></td>
|
<%= image_pack_tag("static/mastercard-logo.svg", width: 28, class: "icon") %>
|
||||||
|
<%= image_pack_tag("static/visa-logo.svg", width: 28, class: "icon") %>
|
||||||
|
<%= image_pack_tag("static/discover-logo.svg", width: 28, class: "icon") %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>
|
||||||
|
<% if @user_upgrade.purchaser.is_anonymous? %>
|
||||||
|
<%= link_to "Create free account", new_user_path(url: new_user_upgrade_path), class: "button-outline-primary" %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<% if @user_upgrade.purchaser.is_anonymous? %>
|
||||||
|
<%= link_to "Get #{Danbooru.config.canonical_app_name} Gold", new_user_path(url: new_user_upgrade_path), class: "button-primary" %>
|
||||||
|
<% elsif @user_upgrade.recipient.level <= User::Levels::MEMBER %>
|
||||||
|
<%= button_to "Get #{Danbooru.config.canonical_app_name} Gold", user_upgrades_path(user_id: @recipient.id, upgrade_type: "gold", country: params[:country], promo: params[:promo]), class: "button-primary", remote: true, disable_with: "Redirecting..." %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<td></td>
|
<%= button_to "Get #{Danbooru.config.canonical_app_name} Gold", user_upgrades_path(user_id: @recipient.id), class: "button-primary", disabled: true %>
|
||||||
<td>
|
<% end %>
|
||||||
<div class="mb-2">
|
</td>
|
||||||
<%= image_pack_tag("static/mastercard-logo.svg", width: 28, class: "icon") %>
|
|
||||||
<%= image_pack_tag("static/visa-logo.svg", width: 28, class: "icon") %>
|
|
||||||
<%= image_pack_tag("static/discover-logo.svg", width: 28, class: "icon") %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%= button_to "Get #{Danbooru.config.canonical_app_name} Gold", nil, class: "button-primary", disabled: true %>
|
|
||||||
</td>
|
|
||||||
<% end %>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<% if @user_upgrade.purchaser.is_anonymous? %>
|
||||||
|
<p class="text-center">
|
||||||
|
Already have an account? <%= link_to "Log in", login_path(url: new_user_upgrade_path) %>.
|
||||||
|
</p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<h2 class="mb-4">Frequently Asked Questions</h2>
|
<h2 class="mb-4">Frequently Asked Questions</h2>
|
||||||
|
|
||||||
<div id="frequently-asked-questions" class="divide-y-1">
|
<div id="frequently-asked-questions" class="divide-y-1">
|
||||||
|
|||||||
Reference in New Issue
Block a user