upgrades: fix post-upgrade landing page.
* Fix the post-upgrade message showing the gift message instead of the normal upgrade message. * Link back to Danbooru so people don't stay on Safebooru and get confused when they can't see hidden posts.
This commit is contained in:
@@ -55,6 +55,10 @@ class UserUpgradesController < ApplicationController
|
|||||||
flash[:error] = e.message
|
flash[:error] = e.message
|
||||||
end
|
end
|
||||||
|
|
||||||
redirect_to user_upgrade_path(user_id: params[:user_id])
|
if @user == CurrentUser.user
|
||||||
|
redirect_to user_upgrade_path
|
||||||
|
else
|
||||||
|
redirect_to user_upgrade_path(user_id: params[:user_id])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
<% if flash[:success] %>
|
<% if flash[:success] %>
|
||||||
<h1>Congratulations!</h1>
|
<h1>Congratulations!</h1>
|
||||||
|
|
||||||
<% if params[:user_id] %>
|
<% if user != CurrentUser.user %>
|
||||||
<p><%= user.name %> is now a <%= user.level_string %> level account. Thanks for supporting the site!</p>
|
<p><%= user.name %> is now a <%= user.level_string %> user. Thanks for supporting the site!</p>
|
||||||
<% else %>
|
<% else %>
|
||||||
<p>You are now a <%= user.level_string %> level account. Thanks for supporting the site!</p>
|
<p>You are now a <%= user.level_string %> user. Thanks for supporting the site!</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<p><%= link_to "Return to posts", posts_path %> </p>
|
<p><%= link_to "Go back to #{Danbooru.config.canonical_app_name}", "https://danbooru.donmai.us" %> to start using your new account.</p>
|
||||||
<% elsif flash[:error] %>
|
<% elsif flash[:error] %>
|
||||||
<h1>An error occurred!</h1>
|
<h1>An error occurred!</h1>
|
||||||
<p><%= flash[:error] %></p>
|
<p><%= flash[:error] %></p>
|
||||||
|
|||||||
Reference in New Issue
Block a user