FIX: Respect site setting to hide username in mailing list summary.

This commit is contained in:
Guo Xiang Tan 2017-01-09 12:18:30 +08:00
parent 4a7d6ea751
commit 98df6db0eb
1 changed files with 10 additions and 1 deletions

View File

@ -56,7 +56,16 @@
<div> <div>
<img style="float: left; width: 20px; padding-right: 5px;" src="<%= post.user.small_avatar_url %>" title="<%= post.user.username%>"> <img style="float: left; width: 20px; padding-right: 5px;" src="<%= post.user.small_avatar_url %>" title="<%= post.user.username%>">
<p style="font-size: 15px; color: #888"> <p style="font-size: 15px; color: #888">
<a href='<%= [Discourse.base_url, :users, post.user.username].join('/') %>'><%= post.user.name || post.user.username %></a> <a href='<%= "#{Discourse.base_url}/users/#{post.user.username}" %>'>
<%- if show_username_on_post(post) %>
<%= post.user.username %>
<% end %>
<%- if show_name_on_post(post) %>
- <%= post.user.name %>
<% end %>
</a>
<span> - </span> <span> - </span>
<span><%= I18n.l(post.created_at, format: :long) %></span> <span><%= I18n.l(post.created_at, format: :long) %></span>
</p> </p>