1 <% content_for :heading do %>
 
   2   <h1><%= t ".title" %></h1>
 
   6   <% if current_user and @user.id == current_user.id %>
 
   7     <div class="col-md order-md-last">
 
   8       <% if !@user.home_location? %>
 
   9         <div id="map" class="content_map border border-secondary-subtle">
 
  10           <p class="m-3"><%= t(".no_home_location_html", :edit_profile_link => link_to(t(".edit_your_profile"), edit_profile_path)) %></p>
 
  13         <% content_for :head do %>
 
  14           <%= javascript_include_tag "user" %>
 
  17              :lon => current_user.home_lon,
 
  18              :lat => current_user.home_lat,
 
  19              :icon => image_path("marker-red.png"),
 
  20              :description => render(:partial => "popup", :object => current_user, :locals => { :type => "your location" })
 
  22         <%= tag.div "", :id => "map", :class => "content_map border border-secondary-subtle rounded z-0", :data => { :user => user_data } %>
 
  25       <% followings = @user.followings %>
 
  26       <% nearby = @user.nearby - followings %>
 
  30       <h2><%= t ".followings" %></h2>
 
  32       <% if followings.empty? %>
 
  33         <%= t ".no followings" %>
 
  35         <nav class='secondary-actions mb-3'>
 
  37             <li><%= link_to t(".followed_changesets"), friend_changesets_path %></li>
 
  38             <li><%= link_to t(".followed_diaries"), friends_diary_entries_path %></li>
 
  42           <%= render :partial => "contact", :collection => followings, :locals => { :type => "following" } %>
 
  48       <h2><%= t ".nearby users" %></h2>
 
  50       <% if nearby.empty? %>
 
  51         <%= t ".no nearby users" %>
 
  53         <nav class='secondary-actions mb-3'>
 
  55             <li><%= link_to t(".nearby_changesets"), nearby_changesets_path %></li>
 
  56             <li><%= link_to t(".nearby_diaries"), nearby_diary_entries_path %></li>
 
  59         <div id="nearbyusers">
 
  60           <%= render :partial => "contact", :collection => nearby, :locals => { :type => "nearby mapper" } %>