From 55918e6835f9492e8aabf243624bd920ec534815 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 13 Jan 2014 10:59:28 -0500 Subject: [PATCH] Adjustments to embedded content --- app/assets/stylesheets/embed.css.scss | 2 +- app/views/embed/comments.html.erb | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/app/assets/stylesheets/embed.css.scss b/app/assets/stylesheets/embed.css.scss index fe7a348bba8..87e211b66f3 100644 --- a/app/assets/stylesheets/embed.css.scss +++ b/app/assets/stylesheets/embed.css.scss @@ -87,4 +87,4 @@ a[href].button { background-color: #eee; padding: 5px; display: inline-block; -} \ No newline at end of file +} diff --git a/app/views/embed/comments.html.erb b/app/views/embed/comments.html.erb index f0b2f765130..539cc0ff1cc 100644 --- a/app/views/embed/comments.html.erb +++ b/app/views/embed/comments.html.erb @@ -1,13 +1,10 @@
- <%- if @topic_view.topic.posts_count > 1 %> + <% if @topic_view.topic.posts_count == 0 %> + <%= link_to(I18n.t('embed.start_discussion'), @topic_view.topic.url, class: 'button', target: '_blank') %> + <% elsif @topic_view.topic.posts_count > 10 %> <%= link_to(I18n.t('embed.continue'), @second_post_url, class: 'button', target: '_blank') %> <%= I18n.t('embed.replies', count: @topic_view.topic.posts_count - 1) %> - - <%- else %> - <%= link_to(I18n.t('embed.start_discussion'), @topic_view.topic.url, class: 'button', target: '_blank') %> - <%- end if %> - - <%= link_to(image_tag(SiteSetting.logo_url, class: 'logo'), Discourse.base_url, target: '_blank') %> + <% end %>
<%- if @topic_view.posts.present? %> @@ -38,7 +35,7 @@ <%- end %> - <%- if @topic_view.topic.posts_count > 4 %> + <% if @topic_view.topic.posts_count > 0 %>