make story/comment avatars link to user profile

This commit is contained in:
joshua stein 2015-07-31 13:10:44 -05:00
parent 229b2da008
commit 3f425a7abc
2 changed files with 8 additions and 7 deletions

View file

@ -31,7 +31,8 @@ class="comment <%= comment.current_vote ? (comment.current_vote[:vote] == 1 ?
<% end %>
<% if @user && @user.show_avatars? %>
<img src="<%= comment.user.avatar_url(16) %>" class="avatar">
<a href="/u/<%= comment.user.username %>"><img
src="<%= comment.user.avatar_url(16) %>" class="avatar"></a>
<% end %>
<% if defined?(was_merged) && was_merged %>

View file

@ -60,17 +60,16 @@ class="story <%= story.vote && story.vote[:vote] == 1 ? "upvoted" : "" %>
<% end %>
<span class="byline">
<% if @user && @user.show_avatars? %>
<img src="<%= ms.user.avatar_url(16) %>" class="avatar">
<a href="/u/<%= ms.user.username %>"><img
src="<%= ms.user.avatar_url(16) %>" class="avatar"></a>
<% end %>
<% if story.user_is_author? %>
authored
<% end %>
by
<a href="/u/<%= ms.user.username %>"
<% if ms.user.is_new? %>
class="new_user"
<% end %>><%= ms.user.username %></a>
<a href="/u/<%= ms.user.username %>" class="<%=
ms.html_class_for_user(@user) %>"><%= ms.user.username %></a>
<%= time_ago_in_words_label(ms.created_at, :strip_about => true) %>
ago
@ -90,7 +89,8 @@ class="story <%= story.vote && story.vote[:vote] == 1 ? "upvoted" : "" %>
<div class="byline">
<% if @user && @user.show_avatars? %>
<img src="<%= story.user.avatar_url(16) %>" class="avatar">
<a href="/u/<%= story.user.username %>"><img
src="<%= story.user.avatar_url(16) %>" class="avatar"></a>
<% end %>
<% if story.user_is_author? %>
authored