moderate refactoring of the user page

This commit is contained in:
Tom MacWright 2012-08-31 11:46:26 -04:00 committed by Tom Hughes
parent ebcb038c1c
commit 582e5b225d

View file

@ -78,17 +78,7 @@
<% end %>
</div>
<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>
<p><b><%= t 'user.view.ct status' %></b>
<% if not @this_user.terms_agreed.nil? -%>
<%= t 'user.view.ct accepted', :ago =>time_ago_in_words(@this_user.terms_agreed) %>
<% elsif not @this_user.terms_seen? -%>
<%= t 'user.view.ct undecided' %>
<% else -%>
<%= t 'user.view.ct declined' %>
<% end -%>
</p>
<% if @user and @user.administrator? -%>
<p><b><%= t 'user.view.email address' %></b> <%= @this_user.email %></p>
@ -99,10 +89,22 @@
<p><b><%= t 'user.view.spam score' %></b> <%= @this_user.spam_score %></p>
<% end -%>
<h3><%= t 'user.view.description' %></h3>
<div id="description"><%= @this_user.description.to_html %></div>
<p class='deemphasize'><small>
<%= t 'user.view.mapper since' %> <%= l @this_user.creation_time.to_date, :format => :long %>
/
<%= t 'user.view.ct status' %>
<% if not @this_user.terms_agreed.nil? -%>
<%= t 'user.view.ct accepted', :ago =>time_ago_in_words(@this_user.terms_agreed) %>
<% elsif not @this_user.terms_seen? -%>
<%= t 'user.view.ct undecided' %>
<% else -%>
<%= t 'user.view.ct declined' %>
<% end -%>
</small>
</p>
<% if @user and @this_user.id == @user.id %>
<div id="map" class="user_map">
<% if @this_user.home_lat.nil? or @this_user.home_lon.nil? %>