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-grey">
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-grey rounded", :data => { :user => user_data } %>
25 <% friends = @user.friends %>
26 <% nearby = @user.nearby - friends %>
30 <h3><%= t ".my friends" %></h3>
32 <% if friends.empty? %>
33 <%= t ".no friends" %>
35 <nav class='secondary-actions mb-3'>
37 <li><%= link_to t(".friends_changesets"), friend_changesets_path %></li>
38 <li><%= link_to t(".friends_diaries"), friends_diary_entries_path %></li>
41 <div id="friends-container">
42 <%= render :partial => "contact", :collection => friends, :locals => { :type => "friend" } %>
48 <h3><%= t ".nearby users" %></h3>
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" } %>