views: inline partials into default layout.

Inline the page footer, news updates, the ban notice, and the user
verification notice into the default layout. This is a micro
optimization to reduce the number of spans reported to the APM.
This commit is contained in:
evazion
2022-04-17 03:55:50 -05:00
parent d19e307e69
commit 604b6ce547
6 changed files with 78 additions and 80 deletions

View File

@@ -1,11 +0,0 @@
<% if CurrentUser.user.is_banned? %>
<% @active_ban = CurrentUser.user.active_ban %>
<div class="notice notice-error notice-large" id="ban-notice">
<h2>You have been banned <%= humanized_duration @active_ban.duration %></h2>
<div>
Reason: <span class="prose"><%= format_text @active_ban.reason, inline: true %></span>
</div>
</div>
<% end %>

View File

@@ -1,10 +0,0 @@
<% if CurrentUser.user.is_restricted? && (params[:controller] == "users" || cookies[:hide_verify_account_notice].blank?) %>
<div class="notice notice-info notice-large" id="verify-account-notice">
<h2>Your account is restricted.</h2>
<div>
You must verify your account because you signed up from a proxy or a VPN.
<%= link_to "Verify your account now", verify_user_email_path(CurrentUser.user) %>.
</div>
<div><%= link_to "Close this", "#", id: "hide-verify-account-notice" %></div>
</div>
<% end %>