Skip to content

A platform for community discussion. Free, open, simple.

FIX: Move custom digest text to correct spot (#33912)

benj3220565a0ce1
diff --git a/app/views/user_notifications/digest.html.erb b/app/views/user_notifications/digest.html.erb
index edb2434333c..db3bf05ae54 100644
--- a/app/views/user_notifications/digest.html.erb
+++ b/app/views/user_notifications/digest.html.erb
@@ -39,10 +39,8 @@
</table>
<%= render partial: "user_notifications/digest/popular_posts" %>
- <%= digest_custom_html("above_popular_topics") %>
<%= render partial: "user_notifications/digest/new_topics" %>
- <%= digest_custom_html("below_popular_topics") %>
<%= render partial: "user_notifications/digest/styles" %>
diff --git a/app/views/user_notifications/digest/_footer.text.erb b/app/views/user_notifications/digest/_footer.text.erb
index 2ed5b2cd364..92db8e32127 100644
--- a/app/views/user_notifications/digest/_footer.text.erb
+++ b/app/views/user_notifications/digest/_footer.text.erb
@@ -1,7 +1,5 @@
<%- site_link = raw(@markdown_linker.create(@site_name, '/')) %>
-<%= digest_custom_text("below_popular_topics") %>
-
<%= raw(@markdown_linker.references) %>
<%= digest_custom_text("above_footer") %>
diff --git a/app/views/user_notifications/digest/_popular_posts.text.erb b/app/views/user_notifications/digest/_popular_posts.text.erb
index 3340c37754a..7e98d91bf71 100644
--- a/app/views/user_notifications/digest/_popular_posts.text.erb
+++ b/app/views/user_notifications/digest/_popular_posts.text.erb
@@ -1,10 +1,9 @@
<%- if @popular_posts.present? %>
-### <%=t 'user_notifications.digest.popular_posts' %>
+ ### <%=t 'user_notifications.digest.popular_posts' %>
-<%- @popular_posts.each_with_index do |post,i| %>
-<%= post.user.username -%> - <%= raw(@markdown_linker.create(post.topic.title, post.topic.url)) %>
+ <%- @popular_posts.each_with_index do |post,i| %>
+ <%= post.user.username -%> - <%= raw(@markdown_linker.create(post.topic.title, post.topic.url)) %>
- <%= raw(post.excerpt(1000, strip_links: true, text_entities: true, markdown_images: true)) %>
-
-<%- end %>
+ <%= raw(post.excerpt(1000, strip_links: true, text_entities: true, markdown_images: true)) %>
+ <%- end %>
<%- end %>
\ No newline at end of file
diff --git a/app/views/user_notifications/digest/_popular_topics.html.erb b/app/views/user_notifications/digest/_popular_topics.html.erb
index 8fa3608cc3b..0bae53568f2 100644
--- a/app/views/user_notifications/digest/_popular_topics.html.erb
+++ b/app/views/user_notifications/digest/_popular_topics.html.erb
@@ -2,6 +2,8 @@
<tbody>
<tr>
<td class="digest-popular-topic-wrapper with-dir" style="-moz-hyphens:auto;-webkit-hyphens:auto;border-collapse:collapse!important;color:#0a0a0a;hyphens:auto;line-height:1.3;margin:0;padding:0;vertical-align:top;word-wrap:normal">
+ <%= digest_custom_html("above_popular_topics") %>
+
<% @popular_topics.each_with_index do |t, i| %>
<%= render partial: "user_notifications/digest/popular_topic", locals: { topic: t } %>
@@ -9,6 +11,8 @@
<%= digest_custom_html("below_post_#{i+1}") %>
<% end %>
<% end %>
+
+ <%= digest_custom_html("below_popular_topics") %>
</td>
</tr>
</tbody>
diff --git a/app/views/user_notifications/digest/_popular_topics.text.erb b/app/views/user_notifications/digest/_popular_topics.text.erb
index 47888041504..73a44de82b9 100644
--- a/app/views/user_notifications/digest/_popular_topics.text.erb
+++ b/app/views/user_notifications/digest/_popular_topics.text.erb
@@ -1,14 +1,16 @@
<%- if @popular_topics.present? %>
-### <%=t 'user_notifications.digest.popular_topics' %>
+ <%= digest_custom_text("above_popular_topics") %>
+ ### <%=t 'user_notifications.digest.popular_topics' %>
-<%- @popular_topics.each_with_index do |t,i| %>
-<%= raw(@markdown_linker.create(t.title, t.url)) %>
+ <%- @popular_topics.each_with_index do |t,i| %>
+ <%= raw(@markdown_linker.create(t.title, t.url)) %>
-<%- if t.best_post.present? %>
- <%= raw(t.best_post.excerpt(1000, strip_links: true, text_entities: true, markdown_images: true)) %>
+ <%- if t.best_post.present? %>
+ <%= raw(t.best_post.excerpt(1000, strip_links: true, text_entities: true, markdown_images: true)) %>
+ <%- end %>
-<%- end %>
-<%= digest_custom_text("below_post_#{i+1}") %>
-<%- end %>
-<%- end %>
-<%= digest_custom_text("above_popular_topics") %>
\ No newline at end of file
+ <%= digest_custom_text("below_post_#{i+1}") %>
+ <%- end %>
+
+ <%= digest_custom_text("below_popular_topics") %>
+<%- end %>
\ No newline at end of file