]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/users/show.html.erb
stub model and show in view
[rails.git] / app / views / users / show.html.erb
index 5b8dcfcc970e20259a5f346c6a3abd9a8af98bd6..ac6938af76066e1fc7a11fed8eb73a28895571dc 100644 (file)
@@ -2,16 +2,16 @@
   <div id='userinformation'>
     <%= user_image @user %>
     <div class='userinformation-inner'>
-      <h1><%= @user.display_name %><%= role_icons(@user) %></h1>
+      <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 %>
             <span class='count-number'><%= number_with_delimiter(current_user.changesets.size) %></span>
           </li>
           <li>
-            <%= link_to t(".my notes"), :controller => "notes", :action => "mine" %>
+            <%= link_to t(".my notes"), user_notes_path(@user) %>
           </li>
           <li>
             <%= link_to t(".my traces"), :controller => "traces", :action => "mine" %>
@@ -53,7 +53,7 @@
             <span class='count-number'><%= number_with_delimiter(@user.changesets.size) %></span>
           </li>
           <li>
-            <%= link_to t(".notes"), :controller => "notes", :action => "mine" %>
+            <%= link_to t(".notes"), user_notes_path(@user) %>
           </li>
           <li>
             <%= link_to t(".traces"), :controller => "traces", :action => "index", :display_name => @user.display_name %>
 
         <% end %>
 
-      <p class='deemphasize'>
+      <p class='text-muted'>
         <small>
           <%= t ".mapper since" %> <%= l @user.creation_time.to_date, :format => :long %>
           <% unless @user.terms_agreed %>
       </p>
     </div>
 
-    <div class="user-description richtext"><%= @user.description.to_html %></div>
+    <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='admin-user-info deemphasize'>
+    <div class='admin-user-info text-muted'>
       <small><b><%= t ".email address" %></b> <%= @user.email %></small>
       <% unless @user.creation_ip.nil? -%>
         <small><b><%= t ".created from" %></b> <%= @user.creation_ip %></small>