<% if @user == current_user && @user.preference.try(:first_login) %>
  <!-- pseudoflash because putting it in a real one was making for some ugly code -->
  <div class="flash notice" id="first-login-help-banner">
    <p>
      <%= t(".login_banner.welcome_html",
            new_user_tips_link: link_to(t(".login_banner.new_user_tips"), first_login_help_path),
            our_faqs_link: link_to(t(".login_banner.our_faqs"), archive_faqs_path)) %>
    </p>
    <p>
      <%= t(".login_banner.help_html",
            contact_support_link: link_to(t(".login_banner.contact_support"), new_feedback_report_path),
            tos_link: link_to(t(".login_banner.tos"), tos_path),
            content_policy_link: link_to(t(".login_banner.content_policy"), content_path),
            privacy_policy_link: link_to(t(".login_banner.privacy_policy"), privacy_path),
            contact_abuse_link: link_to(t(".login_banner.contact_abuse"), new_abuse_report_path)) %>
    </p>
    <%= form_tag end_first_login_user_path(current_user), method: :post, remote: true do %>
      <p class="submit actions">
        <%= submit_tag t(".login_banner.dismiss") %>
        <%= link_to "&times;".html_safe, nil, remote: true, id: "hide-first-login-help", title: t(".login_banner.hide") %>
      </p>
    <% end %>
  </div>
<% end %>

<div class="user home">
  <%= render "users/header" %>
  <%= render "users/contents" %>
</div>

<%= content_for :footer_js do %>
  <%= javascript_tag do %>
      $j("#hide-first-login-help").click(function() {
        $j("#first-login-help-banner").hide();
      })
  <% end %>
<% end %>
