1 <h2><%= @this_user.display_name %></h2>
2 <div id="description"><%= simple_format(@this_user.description) %></div>
4 <% if @user and @this_user.id == @user.id %>
6 <% if !@user.messages.empty? %>
7 <p>You have <%=@user.get_new_messages.length %> new messages and <%=@user.get_all_messages.length - @user.get_new_messages.length %> old messages:</p>
10 <table class="messages">
17 <% if params[:unread] %>
18 <% @user.get_all_messages.each do |message| %>
19 <tr><td><%= link_to User.find(message.from_user_id).display_name , :controller => 'user', :action => User.find(message.from_user_id).display_name %></td>
20 <td><%= link_to message.title , :controller => 'message', :action => 'read', :message_id => message.id %></td>
21 <td><%= message.sent_on %></td>
22 <% if message.message_read = 0 %>
23 <td><%= link_to 'mark as read', :controller => 'message', :action => 'mark', :message_id => message.id %> </td>
27 <td><%= link_to 'reply', :controller => 'message', :action => 'new', :user_id => message.from_user_id %> </td>
33 <% @user.get_new_messages.each do |message| %>
34 <tr><td><%= link_to User.find(message.from_user_id).display_name , :controller => 'user', :action => User.find(message.from_user_id).display_name %></td>
35 <td><%= link_to message.title , :controller => 'message', :action => 'read', :message_id => message.id %></td>
36 <td><%= message.sent_on %></td>
37 <% if message.message_read = 0 %>
38 <td><%= link_to 'mark as read', :controller => 'message', :action => 'mark', :message_id => message.id %> </td>
51 <p>You have no messages. </p>
55 <%= link_to 'show all messages', :controller => 'user', :action => 'view', :display_name => @user.display_name, :unread => true %>
59 <%= link_to 'View your diary', :controller => 'user', :action=>'diary', :display_name => @user.display_name %><br/>
60 <%= link_to 'New diary post', :controller => 'diary_entry', :action=>'new', :display_name => @user.display_name %>
63 <%= link_to 'Edit your settings', :controller => 'user', :action => 'account', :display_name => @user.display_name %>
67 <%= link_to 'Send message', :controller => 'message', :action => 'new', :user_id => @this_user.id %><br />
68 <%= link_to 'Add as friend', :controller => 'user', :action => 'make_friend', :display_name => @this_user.display_name %><br />
69 <%= link_to 'View diary', :controller => 'user', :action=>'diary', :display_name => @this_user.display_name %>
73 <% if @this_user.home_lat and @this_user.home_lon %>
74 <% if @this_user.nearby.empty? %>
75 There are no users who admit to mapping nearby.
77 <table id="nearbyusers">
78 <% @this_user.nearby(1,1).each do |nearby| %>
80 <td class="username"><%= link_to nearby.display_name, :controller => 'user', :action => 'view', :display_name => nearby.display_name %></td>
81 <td class="message">(<%= link_to 'send message', :controller => 'message', :action => 'new', :user_id => nearby.id %>)</td>
88 No home location has been set.