mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Make embedded comments look nicer
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<header>
|
||||
<%- if @topic_view.posts.present? %>
|
||||
<%= link_to(I18n.t('embed.title'), @second_post_url, class: 'button', target: '_blank') %>
|
||||
<%= 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>
|
||||
|
||||
<%- else %>
|
||||
<%= link_to(I18n.t('embed.start_discussion'), @topic_view.topic.url, class: 'button', target: '_blank') %>
|
||||
<%- end if %>
|
||||
@@ -12,17 +14,29 @@
|
||||
<%- @topic_view.posts.each do |post| %>
|
||||
<article class='post'>
|
||||
<%= 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" %>
|
||||
<%- end %>
|
||||
|
||||
<div class='author'>
|
||||
<img src='<%= post.user.small_avatar_url %>'>
|
||||
<h3><%= post.user.username %></h3>
|
||||
<h3 class='username'><%= post.user.username %></h3>
|
||||
</div>
|
||||
<div class='cooked'><%= raw post.cooked %></div>
|
||||
<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>
|
||||
|
||||
<div style='clear: both'></div>
|
||||
</article>
|
||||
<%- end %>
|
||||
|
||||
<footer>
|
||||
<%= 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>
|
||||
<%= link_to(image_tag(SiteSetting.logo_url, class: 'logo'), Discourse.base_url, target: '_blank') %>
|
||||
</footer>
|
||||
|
||||
Reference in New Issue
Block a user