1 <%= user_image @this_user %>
3 <h2><%= @this_user.display_name %><%= role_icons(@this_user) %></h2>
5 <div id="userinformation">
6 <% if @user and @this_user.id == @user.id %>
7 <!-- Displaying user's own profile page -->
8 <%= link_to t('user.view.my diary'), :controller => 'diary_entry', :action => 'list', :display_name => @user.display_name %>
10 <%= link_to t('user.view.new diary entry'), :controller => 'diary_entry', :action => 'new' %>
12 <%= link_to t('user.view.my comments' ), :controller => 'diary_entry', :action => 'comments', :display_name => @this_user.display_name %>
14 <%= link_to t('user.view.my edits'), :controller => 'changeset', :action => 'list', :display_name => @user.display_name %>
16 <%= link_to t('user.view.my traces'), :controller => 'trace', :action=>'mine' %>
18 <%= link_to t('user.view.my settings'), :controller => 'user', :action => 'account', :display_name => @user.display_name %>
20 <%= link_to t('user.view.oauth settings'), :controller => 'oauth_clients', :action => 'index' %>
22 <%= link_to t('user.view.blocks on me'), :controller => 'user_blocks', :action => 'blocks_on', :display_name => @user.display_name %>
23 <% if @user and @user.moderator? %>
24 | <%= link_to t('user.view.blocks by me'), :controller => 'user_blocks', :action => 'blocks_by', :display_name => @user.display_name %>
27 <!-- Displaying another user's profile page -->
28 <%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :display_name => @this_user.display_name %>
30 <%= link_to t('user.view.diary'), :controller => 'diary_entry', :action => 'list', :display_name => @this_user.display_name %>
32 <%= link_to t('user.view.comments'), :controller => 'diary_entry', :action => 'comments', :display_name => @this_user.display_name %>
34 <%= link_to t('user.view.edits'), :controller => 'changeset', :action => 'list', :display_name => @this_user.display_name %>
36 <%= link_to t('user.view.traces'), :controller => 'trace', :action => 'list', :display_name => @this_user.display_name %>
38 <% if @user and @user.is_friends_with?(@this_user) %>
39 <%= link_to t('user.view.remove as friend'), :controller => 'user', :action => 'remove_friend', :display_name => @this_user.display_name %>
41 <%= link_to t('user.view.add as friend'), :controller => 'user', :action => 'make_friend', :display_name => @this_user.display_name %>
44 <%= link_to t('user.view.block_history'), :controller => 'user_blocks', :action => 'blocks_on', :display_name => @this_user.display_name %>
45 <% if @this_user.moderator? %>
46 | <%= link_to t('user.view.moderator_history'), :controller => 'user_blocks', :action => 'blocks_by', :display_name => @this_user.display_name %>
48 <% if @user and @user.moderator? %>
49 | <%= link_to t('user.view.create_block'), :controller => 'user_blocks', :action => 'new', :display_name => @this_user.display_name %>
52 <% if @user and @user.administrator? %>
54 <% if ["active", "confirmed"].include? @this_user.status %>
55 <%= link_to t('user.view.deactivate_user'), {:controller => 'user', :action => 'set_status', :status => 'pending', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %> |
56 <% elsif ["pending"].include? @this_user.status %>
57 <%= link_to t('user.view.activate_user'), {:controller => 'user', :action => 'set_status', :status => 'active', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %> |
59 <% if ["active", "suspended"].include? @this_user.status %>
60 <%= link_to t('user.view.confirm_user'), {:controller => 'user', :action => 'set_status', :status => 'confirmed', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %> |
62 <% if ["pending", "active", "confirmed", "suspended"].include? @this_user.status %>
63 <%= link_to t('user.view.hide_user'), {:controller => 'user', :action => 'set_status', :status => 'deleted', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %> |
65 <%= link_to t('user.view.unhide_user'), {:controller => 'user', :action => 'set_status', :status => 'active', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %> |
67 <%= link_to t('user.view.delete_user'), {:controller => 'user', :action => 'delete', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %>
71 <p><b><%= t 'user.view.mapper since' %></b> <%= l @this_user.creation_time, :format => :friendly %> <%= t 'user.view.ago', :time_in_words_ago => time_ago_in_words(@this_user.creation_time) %></p>
73 <p><b><%= t 'user.view.ct status' %></b>
74 <% if not @this_user.terms_agreed.nil? -%>
75 <%= t 'user.view.ct accepted', :ago =>time_ago_in_words(@this_user.terms_agreed) %>
76 <% elsif not @this_user.terms_seen? -%>
77 <%= t 'user.view.ct undecided' %>
79 <%= t 'user.view.ct declined' %>
83 <% if @user and @user.administrator? -%>
84 <p><b><%= t 'user.view.email address' %></b> <%= @this_user.email %></p>
85 <% unless @this_user.creation_ip.nil? -%>
86 <p><b><%= t 'user.view.created from' %></b> <%= @this_user.creation_ip %></p>
88 <p><b><%= t 'user.view.status' %></b> <%= @this_user.status.capitalize %></p>
89 <p><b><%= t 'user.view.spam score' %></b> <%= @this_user.spam_score %></p>
92 <h3><%= t 'user.view.description' %></h3>
94 <div id="description"><%= @this_user.description.to_html %></div>
96 <% if @user and @this_user.id == @user.id %>
97 <div id="map" class="user_map">
98 <% if @this_user.home_lat.nil? or @this_user.home_lon.nil? %>
99 <p id="no_home_location"><%= raw(t 'user.view.if set location', :settings_link => (link_to t('user.view.settings_link_text'), :controller => 'user', :action => 'account', :display_name => @user.display_name)) %></p>
101 <%= render :partial => 'map', :locals => { :setting_location => false, :show_other_users => true } %>
105 <% friends = @this_user.friends.collect { |f| f.befriendee } %>
106 <% nearby = @this_user.nearby - friends %>
108 <h3 style="margin-top: 0"><%= t 'user.view.your friends' %></h3>
110 <% if friends.empty? %>
111 <%= t 'user.view.no friends' %>
113 <%= link_to t('user.view.friends_changesets'), friend_changesets_path %><br/>
114 <%= link_to t('user.view.friends_diaries'), friend_diaries_path %><br/><br/>
116 <%= render :partial => "contact", :collection => friends %>
120 <h3><%= t 'user.view.nearby users' %></h3>
122 <% if nearby.empty? %>
123 <%= t 'user.view.no nearby users' %>
125 <%= link_to t('user.view.nearby_changesets'), nearby_changesets_path %><br/>
126 <%= link_to t('user.view.nearby_diaries'), nearby_diaries_path %><br/><br/>
127 <table id="nearbyusers">
128 <%= render :partial => "contact", :collection => nearby %>