2013-12-31 13:37:43 -06:00
|
|
|
<header>
|
|
|
|
<%- if @topic_view.posts.present? %>
|
2014-01-03 11:52:24 -06:00
|
|
|
<%= 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>
|
|
|
|
|
2013-12-31 13:37:43 -06:00
|
|
|
<%- else %>
|
|
|
|
<%= link_to(I18n.t('embed.start_discussion'), @topic_view.topic.url, class: 'button', target: '_blank') %>
|
|
|
|
<%- end if %>
|
|
|
|
|
2014-01-02 15:40:54 -06:00
|
|
|
<%= link_to(image_tag(SiteSetting.logo_url, class: 'logo'), Discourse.base_url, target: '_blank') %>
|
2013-12-31 13:37:43 -06:00
|
|
|
</header>
|
|
|
|
|
|
|
|
<%- if @topic_view.posts.present? %>
|
|
|
|
<%- @topic_view.posts.each do |post| %>
|
2014-01-03 12:08:52 -06:00
|
|
|
<article class='post<%- if post.trashed? %> deleted<% end %>'>
|
2013-12-31 13:37:43 -06:00
|
|
|
<%= link_to post.created_at.strftime("%e %b %Y"), post.url, class: 'post-date', target: "_blank" %>
|
2014-01-03 11:52:24 -06:00
|
|
|
<%- if post.reply_to_post.present? %>
|
|
|
|
<%= link_to I18n.t('embed.in_reply_to', username: post.reply_to_post.username), post.reply_to_post.url, class: 'in-reply-to', target: "_blank" %>
|
|
|
|
<%- end %>
|
|
|
|
|
2013-12-31 13:37:43 -06:00
|
|
|
<div class='author'>
|
|
|
|
<img src='<%= post.user.small_avatar_url %>'>
|
2014-01-03 11:52:24 -06:00
|
|
|
<h3 class='username'><%= post.user.username %></h3>
|
2013-12-31 13:37:43 -06:00
|
|
|
</div>
|
2014-01-03 11:52:24 -06:00
|
|
|
<div class='cooked'>
|
|
|
|
<%= raw post.cooked %>
|
|
|
|
|
|
|
|
<%- if post.reply_count > 0 %>
|
|
|
|
<%= link_to I18n.t('embed.replies', count: post.reply_count), post.url, class: 'post-replies', target: "_blank" %>
|
|
|
|
<%- end %>
|
|
|
|
</div>
|
|
|
|
|
2013-12-31 13:37:43 -06:00
|
|
|
<div style='clear: both'></div>
|
|
|
|
</article>
|
|
|
|
<%- end %>
|
|
|
|
|
|
|
|
<footer>
|
2014-01-03 12:08:52 -06:00
|
|
|
<%= link_to(I18n.t('embed.continue'), @topic_view.topic.last_post_url, class: 'button', target: '_blank') %>
|
2014-01-03 11:52:24 -06:00
|
|
|
<span class='replies'><%= I18n.t('embed.replies', count: @topic_view.topic.posts_count) %></span>
|
2014-01-02 10:32:50 -06:00
|
|
|
<%= link_to(image_tag(SiteSetting.logo_url, class: 'logo'), Discourse.base_url, target: '_blank') %>
|
2013-12-31 13:37:43 -06:00
|
|
|
</footer>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|