mirror of
https://github.com/discourse/discourse.git
synced 2025-02-22 20:05:24 +08:00
FIX: When embedded, don't show button at the top unless there are more than 10 posts.
This commit is contained in:
parent
9097368038
commit
c82279b9bd
@ -1,7 +1,7 @@
|
|||||||
<header>
|
<header>
|
||||||
<% if @topic_view.topic.posts_count == 0 %>
|
<% if @topic_view.topic.posts_count == 0 %>
|
||||||
<%= link_to(I18n.t('embed.start_discussion'), @topic_view.topic.url, class: 'button', target: '_blank') %>
|
<%= link_to(I18n.t('embed.start_discussion'), @topic_view.topic.url, class: 'button', target: '_blank') %>
|
||||||
<% else %>
|
<% elsif @topic_view.topic.posts_count > 10 %>
|
||||||
<%= link_to(I18n.t('embed.continue'), @second_post_url, class: 'button', target: '_blank') %>
|
<%= link_to(I18n.t('embed.continue'), @second_post_url, class: 'button', target: '_blank') %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<span class='replies'><%= I18n.t('embed.replies', count: @topic_view.topic.posts_count - 1) %></span>
|
<span class='replies'><%= I18n.t('embed.replies', count: @topic_view.topic.posts_count - 1) %></span>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user