Embedded: Change bottom link to last post, show deleted posts correctly.
This commit is contained in:
parent
1ffcf39448
commit
59ea1c3c2c
|
@ -4,6 +4,10 @@
|
||||||
article.post {
|
article.post {
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
|
|
||||||
|
&.deleted {
|
||||||
|
background-color: #ffe5e5;
|
||||||
|
}
|
||||||
|
|
||||||
.post-date {
|
.post-date {
|
||||||
float: right;
|
float: right;
|
||||||
color: #aaa;
|
color: #aaa;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
<%- if @topic_view.posts.present? %>
|
<%- if @topic_view.posts.present? %>
|
||||||
<%- @topic_view.posts.each do |post| %>
|
<%- @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" %>
|
<%= link_to post.created_at.strftime("%e %b %Y"), post.url, class: 'post-date', target: "_blank" %>
|
||||||
<%- if post.reply_to_post.present? %>
|
<%- 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" %>
|
<%= 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 %>
|
<%- end %>
|
||||||
|
|
||||||
<footer>
|
<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>
|
<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') %>
|
<%= link_to(image_tag(SiteSetting.logo_url, class: 'logo'), Discourse.base_url, target: '_blank') %>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
Loading…
Reference in New Issue