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

47 lines
1.4 KiB
Text
Raw Normal View History

2013-02-05 14:16:51 -05:00
<h2>
2013-02-13 06:15:10 -05:00
<%= render_topic_title(@topic_view.topic) %>
2013-02-05 14:16:51 -05:00
</h2>
<% if c = @topic_view.topic.category %>
<a href="/category/<%= c.slug.blank? ? c.id : c.slug %>"><%= c.name %></a>
<% end %>
2013-02-13 01:43:21 -05:00
<hr/>
<% @topic_view.posts.each do |post| %>
<% if post.user %>
<div class='creator'>
<b><%= post.user.username %></b>
2014-09-22 19:51:22 -04:00
<%= "(#{post.user.name})" if SiteSetting.display_name_on_posts %> —
<%= post.created_at.to_formatted_s(:iso8601) %> —
#<%= post.post_number %>
</div>
<div class='post'>
<% if post.hidden %>
<%= t('flagging.user_must_edit').html_safe %>
<% else %>
<%= post.cooked.html_safe %>
<% end %>
</div>
<hr/>
<% end %>
2013-02-05 14:16:51 -05:00
<% end %>
2014-03-03 12:56:37 -05:00
<p>
<% if @topic_view.prev_page %>
2014-03-03 12:56:37 -05:00
<%= link_to t(:prev_page), @topic_view.prev_page_path, rel: 'prev' %>
<% end %>
<% if @topic_view.next_page %>
2014-05-20 19:21:47 -04:00
<b><%= link_to t(:next_page), @topic_view.next_page_path, rel: 'next' %></b>
2014-03-03 12:56:37 -05:00
<% end %>
</p>
2013-02-05 14:16:51 -05:00
2013-02-13 01:43:21 -05:00
<% content_for :head do %>
<%= auto_discovery_link_tag(@topic_view, {action: :feed, slug: @topic_view.topic.slug, topic_id: @topic_view.topic.id}, title: t('rss_posts_in_topic', topic: @topic_view.title), type: 'application/rss+xml') %>
<%= crawlable_meta_data(title: @topic_view.title,
description: @topic_view.summary,
image: @topic_view.image_url) %>
<% end %>
<% content_for(:title) { @topic_view.title } %>