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