discourse/app/views/topics/show.html.erb

22 lines
596 B
Text

<h2>
<a href="<%= @topic_view.relative_url %>"><%= @topic_view.title %></a>
</h2>
<% @topic_view.posts.each do |post| %>
<div class='creator'>
#<%=post.post_number%> By: <b><%= post.user.name %></b>, <%= post.created_at.to_formatted_s(:long_ordinal) %>
</div>
<div class='post'>
<%= post.cooked.html_safe %>
</div>
<% end %>
<% if @topic_view.next_page %>
<p>
<b><a href="<%= @topic_view.next_page_path %>">next page</a></b>
</p>
<% end %>
<%- content_for :canonical do %>
<%= "#{request.protocol}#{request.host_with_port}#{@topic_view.canonical_path}" %>
<%- end %>