From 8cd30cdc8b9bd7c502b67f7b38a65ac55d7dd632 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Wed, 30 Nov 2016 17:57:57 -0500 Subject: [PATCH] FIX: respect the enable_names setting, and fix cases when html is invalid --- app/views/user_notifications/digest.html.erb | 29 ++++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/app/views/user_notifications/digest.html.erb b/app/views/user_notifications/digest.html.erb index 9bb24e9df13..c64f48b6ca2 100644 --- a/app/views/user_notifications/digest.html.erb +++ b/app/views/user_notifications/digest.html.erb @@ -130,7 +130,7 @@ body, table, td, th, h1, h2, h3 {font-family: Helvetica, Arial, sans-serif !impo
<%= t.user.try(:username) -%>
- <% if t.user.try(:name).present? %> + <% if SiteSetting.enable_names? && t.user.try(:name).present? %>

<%= t.user.name -%>

<% end %> @@ -219,7 +219,7 @@ body, table, td, th, h1, h2, h3 {font-family: Helvetica, Arial, sans-serif !impo @@ -261,8 +261,10 @@ body, table, td, th, h1, h2, h3 {font-family: Helvetica, Arial, sans-serif !impo + + +
-

+

<%=t 'user_notifications.digest.popular_posts' %>

-
<%= post.user.username -%>
-

<%= post.user.name -%>

+
<%= post.user.try(:username) -%>
+ <% if SiteSetting.enable_names? && post.user.try(:name) %> +

<%= post.user.name -%>

+ <% end %>

@@ -279,23 +281,33 @@ body, table, td, th, h1, h2, h3 {font-family: Helvetica, Arial, sans-serif !impo

- +
 
 
<% end %> +
 
+ <% end %> <% if @other_new_for_you.present? %> -
<%=t 'user_notifications.digest.more_new' %>
+
<%=t 'user_notifications.digest.more_new' %>
<%= digest_custom_html("above_popular_topics") %> + + + + + + +
  + @@ -342,6 +354,11 @@ body, table, td, th, h1, h2, h3 {font-family: Helvetica, Arial, sans-serif !impo
+
 
+ <%= digest_custom_html("below_popular_topics") %> <% end %>