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