]> git.openstreetmap.org Git - rails.git/blob - app/views/dashboards/show.html.erb
Merge remote-tracking branch 'upstream/pull/5717'
[rails.git] / app / views / dashboards / show.html.erb
1 <% content_for :heading do %>
2   <h1><%= t ".title" %></h1>
3 <% end %>
4
5 <div class="row">
6   <div class="col-md order-md-last">
7     <% if !current_user.home_location? %>
8       <div id="map" class="content_map border border-secondary-subtle">
9         <p class="m-3"><%= t(".no_home_location_html", :edit_profile_link => link_to(t(".edit_your_profile"), edit_profile_path)) %></p>
10       </div>
11     <% else %>
12       <% content_for :head do %>
13         <%= javascript_include_tag "user" %>
14       <% end %>
15       <% user_data = {
16            :lon => current_user.home_lon,
17            :lat => current_user.home_lat,
18            :icon => image_path("marker-red.png"),
19            :description => render(:partial => "popup", :object => current_user, :locals => { :type => "your location" })
20          } %>
21       <%= tag.div "", :id => "map", :class => "content_map border border-secondary-subtle rounded z-0", :data => { :user => user_data } %>
22     <% end %>
23   </div>
24
25   <div class="col-md">
26     <h2><%= t ".followings" %></h2>
27
28     <% if @followings.empty? %>
29       <%= t ".no followings" %>
30     <% else %>
31       <nav class='secondary-actions mb-3'>
32         <ul class='clearfix'>
33           <li><%= link_to t(".followed_changesets"), friend_changesets_path %></li>
34           <li><%= link_to t(".followed_diaries"), friends_diary_entries_path %></li>
35         </ul>
36       </nav>
37       <div>
38         <%= render :partial => "contact", :collection => @followings, :locals => { :type => "following" } %>
39       </div>
40     <% end %>
41
42     <hr>
43
44     <h2><%= t ".nearby users" %></h2>
45
46     <% if @nearby_users.empty? %>
47       <%= t ".no nearby users" %>
48     <% else %>
49       <nav class='secondary-actions mb-3'>
50         <ul class='clearfix'>
51           <li><%= link_to t(".nearby_changesets"), nearby_changesets_path %></li>
52           <li><%= link_to t(".nearby_diaries"), nearby_diary_entries_path %></li>
53         </ul>
54       </nav>
55       <div id="nearbyusers">
56         <%= render :partial => "contact", :collection => @nearby_users, :locals => { :type => "nearby mapper" } %>
57       </div>
58     <% end %>
59   </div>
60 </div>