Improved Embedded templates slightly.

This commit is contained in:
Robin Ward 2014-01-07 15:48:26 -05:00
parent 92f0c6537c
commit b268ea8363
2 changed files with 12 additions and 10 deletions
app/views/embed
config/locales

View file

@ -1,7 +1,7 @@
<header>
<%- if @topic_view.posts.present? %>
<%- if @topic_view.topic.posts_count > 1 %>
<%= link_to(I18n.t('embed.continue'), @second_post_url, class: 'button', target: '_blank') %>
<span class='replies'><%= I18n.t('embed.replies', count: @topic_view.topic.posts_count) %></span>
<span class='replies'><%= I18n.t('embed.replies', count: @topic_view.topic.posts_count - 1) %></span>
<%- else %>
<%= link_to(I18n.t('embed.start_discussion'), @topic_view.topic.url, class: 'button', target: '_blank') %>
@ -38,13 +38,15 @@
</article>
<%- end %>
<footer>
<%= link_to(I18n.t('embed.continue'), @topic_view.posts.last.url, class: 'button', target: '_blank') %>
<%- if @posts_left > 0 %>
<span class='replies'><%= I18n.t('embed.more_replies', count: @posts_left) %></span>
<%- end %>
<%= link_to(image_tag(SiteSetting.logo_url, class: 'logo'), Discourse.base_url, target: '_blank') %>
</footer>
<%- if @topic_view.topic.posts_count > 4 %>
<footer>
<%= link_to(I18n.t('embed.continue'), @topic_view.posts.last.url, class: 'button', target: '_blank') %>
<%- if @posts_left > 0 %>
<span class='replies'><%= I18n.t('embed.more_replies', count: @posts_left) %></span>
<%- end %>
<%= link_to(image_tag(SiteSetting.logo_url, class: 'logo'), Discourse.base_url, target: '_blank') %>
</footer>
<% end %>
<% end %>

View file

@ -40,7 +40,7 @@ en:
loading: "Loading Discussion..."
permalink: "Permalink"
imported_from: "Imported from: %{link}"
imported_from: "Discussion topic for the original blog entry at: %{link}"
in_reply_to: "in reply to %{username}"
replies:
one: "1 reply"