]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/users/show.html.erb
Use correct link for users with no location
[rails.git] / app / views / users / show.html.erb
index 302ec5bd3935db3d9a65dd8dd3beb39a02fa8e68..1dd84edeaf4a581dd8a433a7616bab57675d2ce9 100644 (file)
@@ -4,7 +4,7 @@
     <div class='userinformation-inner'>
       <h1><%= @user.display_name %> <%= role_icons(@user) %></h1>
       <% if current_user and @user.id == current_user.id %>
-        <!-- Displaying user's own profile page to themself -->
+        <!-- Displaying user's own profile page -->
         <ul class='secondary-actions clearfix'>
           <li>
             <%= link_to t(".my edits"), :controller => "changesets", :action => "index", :display_name => current_user.display_name %>
 
     <div class="user-description richtext text-break"><%= @user.description.to_html %></div>
 
+    <% if current_user and @user.id == current_user.id %>
+      <div class="my-3">
+        <%= link_to t(".edit_profile"), edit_profile_path, :class => "btn btn-outline-primary" %>
+      </div>
+    <% end %>
+
   </div>
 
   <% if current_user and current_user.administrator? -%>
     <div class="col-md order-md-last">
       <% if @user.home_lat.nil? or @user.home_lon.nil? %>
         <div id="map" class="content_map">
-          <p id="no_home_location"><%= t(".if_set_location_html", :settings_link => (link_to t(".settings_link_text"), :controller => "users", :action => "account", :display_name => current_user.display_name)) %></p>
+          <p id="no_home_location"><%= t(".set_location_html", :edit_profile_url => edit_profile_path) %></p>
         </div>
       <% else %>
         <% content_for :head do %>