Embedded: Change bottom link to last post, show deleted posts correctly.

This commit is contained in:
Robin Ward 2014-01-03 13:08:52 -05:00
parent 1ffcf39448
commit 59ea1c3c2c
2 changed files with 6 additions and 2 deletions

View File

@ -4,6 +4,10 @@
article.post {
border-bottom: 1px solid #ddd;
&.deleted {
background-color: #ffe5e5;
}
.post-date {
float: right;
color: #aaa;

View File

@ -12,7 +12,7 @@
<%- if @topic_view.posts.present? %>
<%- @topic_view.posts.each do |post| %>
<article class='post'>
<article class='post<%- if post.trashed? %> deleted<% end %>'>
<%= link_to post.created_at.strftime("%e %b %Y"), post.url, class: 'post-date', target: "_blank" %>
<%- 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" %>
@ -35,7 +35,7 @@
<%- end %>
<footer>
<%= link_to(I18n.t('embed.continue'), @second_post_url, class: 'button', target: '_blank') %>
<%= link_to(I18n.t('embed.continue'), @topic_view.topic.last_post_url, class: 'button', target: '_blank') %>
<span class='replies'><%= I18n.t('embed.replies', count: @topic_view.topic.posts_count) %></span>
<%= link_to(image_tag(SiteSetting.logo_url, class: 'logo'), Discourse.base_url, target: '_blank') %>
</footer>