mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: display correct replies count in embedded comments view. (#14175)
Previosuly, the reply count included the "small_action" posts too. It also caused the broken embed HTML issue.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<header class='discourse' data-embed-state='loaded'>
|
||||
<% if @topic_view.topic.posts_count < 2 %>
|
||||
<% if @reply_count < 1 %>
|
||||
<%= link_to(I18n.t('embed.start_discussion'), @topic_view.topic.url, class: 'button', target: '_blank') %>
|
||||
<% elsif @topic_view.topic.posts_count > 10 %>
|
||||
<% elsif @reply_count >= 10 %>
|
||||
<%= link_to(I18n.t('embed.continue'), @second_post_url, class: 'button', target: '_blank') %>
|
||||
<% end %>
|
||||
<span class='replies'><%= I18n.t('embed.replies', count: @reply_count) %></span>
|
||||
|
||||
Reference in New Issue
Block a user