FIX: When embedded, don't show button at the top unless there are more than 10 posts.

This commit is contained in:
Robin Ward 2014-01-14 16:06:04 -05:00
parent 9097368038
commit c82279b9bd

View file

@ -1,7 +1,7 @@
<header>
<% if @topic_view.topic.posts_count == 0 %>
<%= 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') %>
<% end %>
<span class='replies'><%= I18n.t('embed.replies', count: @topic_view.topic.posts_count - 1) %></span>