]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/user/view.html.erb
Added report icon + changes to admin UI + changes to report form + few other minor...
[rails.git] / app / views / user / view.html.erb
index de2e93f9439c2ac4757ddee1d40119832cd6b3c4..c85ca5fd9a5c9b77585c30fe831a52ffdf3c300b 100644 (file)
@@ -2,14 +2,17 @@
   <div id='userinformation'>
     <%= user_image @this_user %>
     <div class='userinformation-inner'>
-      <h2><%= @this_user.display_name %><%= role_icons(@this_user) %></h2>
+      <h1><%= @this_user.display_name %><%= role_icons(@this_user) %></h1>
       <% if @user and @this_user.id == @user.id %>
-        <!-- Displaying user's own profile page -->
+        <!-- Displaying user's own profile page to themself -->
         <ul class='secondary-actions clearfix'>
           <li>
             <%= link_to t('user.view.my edits'), :controller => 'changeset', :action => 'list', :display_name => @user.display_name %>
             <span class='count-number'><%= number_with_delimiter(@user.changesets.size) %></span>
           </li>
+          <li>
+            <%= link_to t('user.view.my notes'), :controller => 'notes', :action=> 'mine' %>
+          </li>
           <li>
             <%= link_to t('user.view.my traces'), :controller => 'trace', :action=>'mine' %>
             <span class='count-number'><%= number_with_delimiter(@user.traces.size) %></span>
         </ul>
 
         <% else %>
-
+        <!-- Displaying user profile page to the public -->
         <ul class='secondary-actions clearfix'>
 
           <li>
             <%= link_to t('user.view.edits'), :controller => 'changeset', :action => 'list', :display_name => @this_user.display_name %>
             <span class='count-number'><%= number_with_delimiter(@this_user.changesets.size) %></span>
           </li>
+          <li>
+            <%= link_to t('user.view.notes'), :controller => 'notes', :action=> 'mine' %>
+          </li>
           <li>
             <%= link_to t('user.view.traces'), :controller => 'trace', :action => 'list', :display_name => @this_user.display_name %>
             <span class='count-number'><%= number_with_delimiter(@this_user.traces.size) %></span>
           <li>
             <% if @user and @user.is_friends_with?(@this_user) %>
               <%= link_to t('user.view.remove as friend'), remove_friend_path(:display_name => @this_user.display_name), :method => :post %>
-            <% else %>
+            <% elsif @user %>
               <%= link_to t('user.view.add as friend'), make_friend_path(:display_name => @this_user.display_name), :method => :post %>
+            <% else %>
+              <%= link_to t('user.view.add as friend'), make_friend_path(:display_name => @this_user.display_name) %>
             <% end %>
           </li>
-
           <% if @this_user.blocks.exists? %>
             <li>
               <%= link_to t('user.view.block_history'), :controller => 'user_blocks', :action => 'blocks_on', :display_name => @this_user.display_name %>
       </p>
     </div>
 
-    <div class='user-description'><%= @this_user.description.to_html %></div>
+    <% if @user and @this_user.id != @user.id %>
+      <div class="report-button">
+         <%= link_to new_issue_url(reportable_id: @this_user.id, reportable_type: @this_user.class.name, reported_user_id: @this_user.id), :title => t('user.view.report') do%>
+            <%= image_tag('notice.png', size: '10x10') %>
+         <% end %>
+      </div>
+    <% end %>
+
+    <div class="user-description richtext"><%= @this_user.description.to_html %></div>
 
   </div>