2015-04-30 12:46:19 -04:00
|
|
|
<h1>
|
2015-02-13 06:34:22 -05:00
|
|
|
<%= render_topic_title(@topic_view.topic) %>
|
2015-04-30 12:46:19 -04:00
|
|
|
</h1>
|
2013-02-13 01:43:21 -05:00
|
|
|
|
2015-06-03 04:13:33 -04:00
|
|
|
<% @breadcrumbs = categories_breadcrumb(@topic_view.topic)
|
|
|
|
if @breadcrumbs.present? %>
|
2015-06-09 04:48:06 -04:00
|
|
|
<div id='breadcrumbs'>
|
2015-06-03 04:13:33 -04:00
|
|
|
<% @breadcrumbs.each_with_index do |c,i| %>
|
2015-06-09 04:48:06 -04:00
|
|
|
<div id="breadcrumb-<%=i%>" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"
|
|
|
|
<%-if (i+1) < @breadcrumbs.length%>
|
|
|
|
itemref="breadcrumb-<%=(i+1)%>"
|
|
|
|
<%-end%>>
|
|
|
|
<a href="<%=c[:url]%>" itemprop="url">
|
|
|
|
<span itemprop="title"><%=c[:name]%></span>
|
|
|
|
</a>
|
|
|
|
</div>
|
2013-04-11 16:04:20 -04:00
|
|
|
<% end %>
|
2015-02-13 06:34:22 -05:00
|
|
|
</div>
|
2015-06-03 04:13:33 -04:00
|
|
|
<% end %>
|
2016-04-25 15:55:15 -04:00
|
|
|
|
2015-06-02 14:27:52 -04:00
|
|
|
<%= server_plugin_outlet "topic_header" %>
|
2016-04-25 15:55:15 -04:00
|
|
|
|
2015-02-13 06:34:22 -05:00
|
|
|
<hr>
|
2013-02-05 14:16:51 -05:00
|
|
|
|
2016-03-17 00:09:08 -04:00
|
|
|
<%- if include_crawler_content? %>
|
2015-11-08 22:55:17 -05:00
|
|
|
|
2015-02-13 06:34:22 -05:00
|
|
|
<% @topic_view.posts.each do |post| %>
|
|
|
|
<div itemscope itemtype='http://schema.org/Article'>
|
|
|
|
<% if (u = post.user) %>
|
|
|
|
<div class='creator'>
|
|
|
|
<span>
|
2015-04-30 12:46:19 -04:00
|
|
|
<a href='<%= Discourse.base_uri %>/users/<%= u.username %>'><b itemprop='author'><%= u.username %></b></a>
|
2015-02-13 06:34:22 -05:00
|
|
|
<%= "(#{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 05:16:40 -05:00
|
|
|
|
2015-02-13 06:34:22 -05: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 01:43:21 -05:00
|
|
|
|
2015-11-08 22:55:17 -05:00
|
|
|
<% end %>
|
|
|
|
|
2013-02-21 13:20:00 -05:00
|
|
|
<% content_for :head do %>
|
2014-01-08 01:20:46 -05: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') %>
|
2015-12-28 07:52:31 -05:00
|
|
|
<%= raw crawlable_meta_data(title: @topic_view.title, description: @topic_view.summary, image: @topic_view.image_url, read_time: @topic_view.read_time, like_count: @topic_view.like_count) %>
|
2013-02-21 13:20:00 -05:00
|
|
|
<% end %>
|
2013-03-18 14:24:27 -04:00
|
|
|
|
2015-07-21 20:26:58 -04:00
|
|
|
<% content_for(:title) { "#{@topic_view.page_title}" } %>
|
2016-08-01 01:06:55 -04:00
|
|
|
|
|
|
|
<% if @topic_view.print %>
|
|
|
|
<% content_for :after_body do %>
|
2016-10-12 13:00:05 -04:00
|
|
|
<%- if rtl? %>
|
|
|
|
<%= DiscourseStylesheets.stylesheet_link_tag(mobile_view? ? :mobile_rtl : :desktop_rtl, 'print') %>
|
|
|
|
<%- else %>
|
|
|
|
<%= DiscourseStylesheets.stylesheet_link_tag(mobile_view? ? :mobile : :desktop, 'print') %>
|
|
|
|
<%- end %>
|
|
|
|
<style media="print">
|
|
|
|
/* For readability */
|
|
|
|
a, a:visited {
|
|
|
|
color: #0088cc !important;
|
|
|
|
}
|
|
|
|
</style>
|
2016-08-01 01:06:55 -04:00
|
|
|
<script>
|
2016-08-10 22:41:32 -04:00
|
|
|
document.addEventListener("DOMContentLoaded", function() {
|
|
|
|
window.print();
|
|
|
|
});
|
2016-08-01 01:06:55 -04:00
|
|
|
</script>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|