2013-02-06 03:16:51 +08:00
|
|
|
<h2>
|
2015-02-13 19:34:22 +08:00
|
|
|
<%= render_topic_title(@topic_view.topic) %>
|
2013-02-06 03:16:51 +08:00
|
|
|
</h2>
|
2013-02-13 14:43:21 +08:00
|
|
|
|
2015-02-13 19:34:22 +08:00
|
|
|
<div itemscope itemtype='http://schema.org/BreadcrumbList'>
|
|
|
|
<% categories_breadcrumb(@topic_view.topic).each_with_index do |c,i| %>
|
|
|
|
<span itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>
|
|
|
|
<%= link_to c[:url], itemprop: 'item' do %>
|
|
|
|
<span itemprop='name'><%= c[:name] %></span>
|
2014-04-15 23:57:43 +08:00
|
|
|
<% end %>
|
2015-02-13 19:34:22 +08:00
|
|
|
</span>
|
|
|
|
<meta itemprop='position' content='<%= i + 1 %>'>
|
2013-04-12 04:04:20 +08:00
|
|
|
<% end %>
|
2015-02-13 19:34:22 +08:00
|
|
|
</div>
|
|
|
|
<hr>
|
2013-02-06 03:16:51 +08:00
|
|
|
|
2015-02-13 19:34:22 +08:00
|
|
|
<% @topic_view.posts.each do |post| %>
|
|
|
|
<div itemscope itemtype='http://schema.org/Article'>
|
|
|
|
<% if (u = post.user) %>
|
|
|
|
<div class='creator'>
|
|
|
|
<span>
|
|
|
|
<a href='/users/<%= u.username %>'><b itemprop='author'><%= u.username %></b></a>
|
|
|
|
<%= "(#{u.name})" if (SiteSetting.display_name_on_posts && SiteSetting.enable_names? && !u.name.blank?) %>
|
|
|
|
<time datetime='<%= post.created_at.to_formatted_s(:iso8601) %>' itemprop='datePublished'>
|
|
|
|
<%= post.created_at %>
|
|
|
|
</time>
|
|
|
|
</span>
|
|
|
|
<span itemprop='position'>#<%= post.post_number %></span>
|
|
|
|
</div>
|
|
|
|
<div class='post' itemprop='articleBody'>
|
|
|
|
<%= post.hidden ? t('flagging.user_must_edit').html_safe : post.cooked.html_safe %>
|
|
|
|
</div>
|
|
|
|
<meta itemprop='interactionCount' content='UserLikes:<%= post.like_count %>'>
|
|
|
|
<meta itemprop='interactionCount' content='UserComments:<%= post.reply_count %>'>
|
|
|
|
<hr>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2014-03-01 18:16:40 +08:00
|
|
|
|
2015-02-13 19:34:22 +08:00
|
|
|
<% if @topic_view.prev_page || @topic_view.next_page %>
|
|
|
|
<div role='navigation' itemscope itemtype='http://schema.org/SiteNavigationElement'>
|
|
|
|
<% if @topic_view.prev_page %>
|
|
|
|
<span itemprop='url'><%= link_to t(:prev_page), @topic_view.prev_page_path, rel: 'prev', itemprop: 'name' %></span>
|
|
|
|
<% end %>
|
|
|
|
<% if @topic_view.next_page %>
|
|
|
|
<span itemprop='url'><b><%= link_to t(:next_page), @topic_view.next_page_path, rel: 'next', itemprop: 'name' %></b></span>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2013-02-13 14:43:21 +08:00
|
|
|
|
2013-02-22 02:20:00 +08:00
|
|
|
<% content_for :head do %>
|
2014-01-08 14:20:46 +08:00
|
|
|
<%= 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') %>
|
2013-03-09 04:58:37 +08:00
|
|
|
<%= crawlable_meta_data(title: @topic_view.title,
|
|
|
|
description: @topic_view.summary,
|
|
|
|
image: @topic_view.image_url) %>
|
2013-02-22 02:20:00 +08:00
|
|
|
<% end %>
|
2013-03-19 02:24:27 +08:00
|
|
|
|
2014-01-08 14:20:46 +08:00
|
|
|
<% content_for(:title) { @topic_view.title } %>
|