Removing list of nearby users from account page (now duplicated publicly on user profile page), changing 'Name' label to 'Email' and moving the description textbox further up the page.
This commit is contained in:
parent
c102580baa
commit
0cf6df6d3a
1 changed files with 7 additions and 27 deletions
|
@ -2,11 +2,14 @@
|
|||
<%= error_messages_for 'user' %>
|
||||
<% form_tag :controller => 'user', :action => 'account', :display_name => @user.display_name do %>
|
||||
<table style="width : 100%">
|
||||
<tr><td>Name</td><td><%= @user.email %></td></tr>
|
||||
<tr><td>Email</td><td><%= @user.email %></td></tr>
|
||||
<tr><td>Mapper since</td><td><%= @user.creation_time %> (<%= time_ago_in_words(@user.creation_time) %> ago)</td></tr>
|
||||
<tr><td>Display Name</td><td><%= text_field :user, :display_name, :value => @user.display_name %></td></tr>
|
||||
<tr><td>Password</td><td><%= password_field('user', 'pass_crypt',{:value => '', :size => 50, :maxlength => 255}) %></td></tr>
|
||||
<tr><td>Confirm Password</td><td><%= password_field('user', 'pass_crypt_confirmation',{:value => '', :size => 50, :maxlength => 255}) %></td></tr>
|
||||
|
||||
<tr><td valign="top">Description</td><td><%= text_area :user, :description, :value => @user.description, :class => "editDescription" %></td></tr>
|
||||
|
||||
<tr id="homerow" <% unless @user.home_lat and @user.home_lon %> class="nohome" <%end%> ><td>Your home</td><td><em class="message">You have not entered your home location.</em><span class="location">Latitude: <%= text_field :user, :home_lat, :value => @user.home_lat, :size => 20, :id => "home_lat" %> Longitude <%= text_field :user, :home_lon, :value => @user.home_lon, :size => 20, :id => "home_lon" %></span> </td></tr>
|
||||
|
||||
<tr><td></td><td>
|
||||
|
@ -16,40 +19,17 @@
|
|||
<p id="highlightinfo"></p>
|
||||
</div>
|
||||
</td></tr>
|
||||
|
||||
<tr><td valign="top">Description</td><td><%= text_area :user, :description, :value => @user.description, :class => "editDescription" %></td></tr>
|
||||
</table>
|
||||
<%= submit_tag 'Save Changes' %>
|
||||
<% end %>
|
||||
|
||||
<% nearest_str = "" %>
|
||||
<% if @user.home_lat and @user.home_lon %>
|
||||
<h2>Users in your area</h2>
|
||||
|
||||
<% if @user.nearby.empty? %>
|
||||
There are no users who admit to mapping in your area. Better go out and spread the word about OSM!
|
||||
<% else %>
|
||||
|
||||
<p>These users are mapping in your area:</p>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Distance</th>
|
||||
<th>Contact</th>
|
||||
</tr>
|
||||
<% if !@user.nearby.empty? %>
|
||||
<% @user.nearby.each do |nearby| %>
|
||||
<% nearest_str += "nearest.push( { 'display_name' : '#{nearby.display_name}', 'home_lat' : #{nearby.home_lat}, 'home_lon' : #{nearby.home_lon} } );\n" %>
|
||||
|
||||
<tr>
|
||||
<td><%= link_to nearby.display_name, :controller => 'user', :action => 'view', :display_name => nearby.display_name %></td>
|
||||
<td><%= @user.distance(nearby).round %>km away</td>
|
||||
<td><%= link_to 'send message', :controller => 'message', :action => 'new', :user_id => nearby.id %></td>
|
||||
</tr>
|
||||
<%end%>
|
||||
</table>
|
||||
|
||||
<%end%>
|
||||
<br />
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<script type="text/javascript">
|
||||
var nearest = [], friends = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue