<% content_for :head do %> <%= javascript_include_tag "heatmap" %> <% end %> <% content_for :heading do %>
<%= user_image @user %>

<%= @user.display_name %> <%= role_icons(@user) %>

<% if current_user and @user.id == current_user.id %> <% else %> <% end %>
<% if @user.home_location_name&.strip.present? %>
<%= t ".home location" %>
<%= @user.home_location_name %>
<% end %>
<%= t ".mapper since" %>
<%= l @user.created_at.to_date, :format => :long %>
<%= t ".last map edit" %>
<%= l @user.changesets.first&.created_at&.to_date, :format => :long, :default => t(".no activity yet") %>
<% unless @user.terms_agreed %>
<%= t ".ct status" %>
<% if @user.terms_seen? -%> <%= t ".ct declined" %> <% else -%> <%= t ".ct undecided" %> <% end -%>
<% end -%> <% if current_user&.moderator? || current_user&.administrator? %>
<%= t ".uid" %>
<%= link_to @user.id, api_user_path(:id => @user.id) %>
<% end -%>
<% if can?(:update, :user_status) %> <% end %> <% if current_user and current_user.administrator? -%>
<%= t ".email address" %>
<%= @user.email %>
<% unless @user.creation_address.nil? -%>
<%= t ".created from" %>
<%= link_to @user.creation_address, users_list_path(:ip => @user.creation_address) %>
<% end -%>
<%= t ".status" %>
<%= link_to @user.status.capitalize, users_list_path(:status => @user.status) %>
<%= t ".spam score" %>
<%= @user.spam_score %>
<% end -%>
<% end %> <% if @user.social_links.empty? %>
<%= @user.description.to_html %>
<% else %>
<%= render "social_links/show", :social_links => @user.social_links %>
<%= @user.description.to_html %>
<% end %> <% if @heatmap_frame %> <%= turbo_frame_tag "#{dom_id(@user)}_heatmap", :src => user_heatmap_path(@user), :data => { :turbo => false } %> <% end %> <%= render :partial => "diary_entries/profile_diaries", :locals => { :diary_entries => @user.diary_entries.visible.order(:created_at => :desc).limit(4) } %> <% if current_user and @user.id == current_user.id %>
<%= link_to t(".edit_profile"), edit_profile_path, :class => "btn btn-outline-primary" %>
<% end %>