X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/98bfaace9aeba7fb387596cc16b2e661506173c6..HEAD:/app/views/dashboards/show.html.erb diff --git a/app/views/dashboards/show.html.erb b/app/views/dashboards/show.html.erb index 744661dfd..e110ad531 100644 --- a/app/views/dashboards/show.html.erb +++ b/app/views/dashboards/show.html.erb @@ -3,63 +3,58 @@ <% end %>
- <% if current_user and @user.id == current_user.id %> -
- <% if !@user.home_location? %> -
-

<%= t(".no_home_location_html", :edit_profile_link => link_to(t(".edit_your_profile"), edit_profile_path)) %>

-
- <% else %> - <% content_for :head do %> - <%= javascript_include_tag "user" %> - <% end %> - <% user_data = { - :lon => current_user.home_lon, - :lat => current_user.home_lat, - :icon => image_path("marker-red.png"), - :description => render(:partial => "popup", :object => current_user, :locals => { :type => "your location" }) - } %> - <%= tag.div "", :id => "map", :class => "content_map border border-grey rounded", :data => { :user => user_data } %> +
+ <% if !current_user.home_location? %> +
+

<%= t(".no_home_location_html", :edit_profile_link => link_to(t(".edit_your_profile"), edit_profile_path)) %>

+
+ <% else %> + <% content_for :head do %> + <%= javascript_include_tag "user" %> <% end %> + <% user_data = { + :lon => current_user.home_lon, + :lat => current_user.home_lat, + :icon => image_path("marker-red.png"), + :description => render(:partial => "popup", :object => current_user, :locals => { :type => "your location" }) + } %> + <%= tag.div "", :id => "map", :class => "content_map border border-secondary-subtle rounded z-0", :data => { :user => user_data } %> + <% end %> +
- <% friends = @user.friends %> - <% nearby = @user.nearby - friends %> -
+
+

<%= t ".followings" %>

-
-

<%= t ".my friends" %>

+ <% if @followings.empty? %> + <%= t ".no followings" %> + <% else %> + +
+ <%= render :partial => "contact", :collection => @followings, :locals => { :type => "following" } %> +
+ <% end %> - <% if friends.empty? %> - <%= t ".no friends" %> - <% else %> - -
- <%= render :partial => "contact", :collection => friends, :locals => { :type => "friend" } %> -
- <% end %> - -
+
-

<%= t ".nearby users" %>

+

<%= t ".nearby users" %>

- <% if nearby.empty? %> - <%= t ".no nearby users" %> - <% else %> - -
- <%= render :partial => "contact", :collection => nearby, :locals => { :type => "nearby mapper" } %> -
- <% end %> -
- <% end %> + <% if @nearby_users.empty? %> + <%= t ".no nearby users" %> + <% else %> + +
+ <%= render :partial => "contact", :collection => @nearby_users, :locals => { :type => "nearby mapper" } %> +
+ <% end %> +