From 2858fea24765f56749ea0d8f4aaa276d17a89af8 Mon Sep 17 00:00:00 2001 From: joshua stein Date: Mon, 1 Jul 2013 16:01:05 -0500 Subject: [PATCH] tweak display of user profile data a bit --- app/views/users/show.html.erb | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 25f9e38..6116b33 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -19,34 +19,32 @@ - <%= raw(time_ago_in_words_label(@showing_user.created_at)) %> + <%= raw(time_ago_in_words_label(@showing_user.created_at)) %> ago <% if @showing_user.invited_by_user %> - ago, invited by + by invitation from <%= @showing_user.invited_by_user.username %> - <% else %> - ago <% end %>
- <%= @showing_user.karma %> - (average <%= number_with_precision(@showing_user.average_karma, - :precision => 2) %>) + <%= @showing_user.karma %>, averaging <%= + number_with_precision(@showing_user.average_karma, :precision => 2) %> + per story/comment
+ <% tag = @showing_user.most_common_story_tag %> <%= - @showing_user.stories_submitted_count %> - - <% if tag = @showing_user.most_common_story_tag %> - (most commonly tagged <%= tag ? ", " : "" %> + <% if tag %> + most commonly tagged <%= - tag.tag %>) + tag.tag %> <% end %>
@@ -61,6 +59,10 @@
- <%= raw @showing_user.linkified_about %> + <% if @showing_user.about.present? %> + <%= raw @showing_user.linkified_about %> + <% else %> + A mystery... + <% end %>