Files
danbooru/app/views/forum_topics/show.html.erb
evazion 1b03832b26 /forum_topics/$id: fix atom feed discovery link.
> Found an issue with the forum topic ATOM discovery link. Currently the
> link is visible to feed detectors, but they are unable to add it since
> the link provided is invalid.
>
> <link rel="alternate" type="application/atom+xml" title="Artist tagging
> help" href="http://danbooru.donmai.us/forum_topics.8199" />
2017-05-24 16:11:00 -05:00

62 lines
1.8 KiB
Plaintext

<div id="c-forum-topics">
<div id="a-show">
<h1>
Topic: <%= @forum_topic.title %>
<% if @forum_topic.min_level >= User::Levels::MODERATOR %>
<span class="level-topic">(<%= User.level_string(@forum_topic.min_level).downcase %>+ only)</span>
<% end %>
<% if @forum_topic.is_deleted? %>
<span class="locked-topic">(deleted)</span>
<% end %>
</h1>
<p class="info">Posted under <%= link_to @forum_topic.category_name, forum_topics_path(:search => {:category_id => @forum_topic.category_id}) %></p>
<% if @forum_topic.is_locked? %>
<div class="notice">
<p>This topic has been locked.</p>
</div>
<% end %>
<%= render "forum_posts/listing", :forum_posts => @forum_posts %>
<% if CurrentUser.is_member? %>
<% if CurrentUser.is_moderator? || !@forum_topic.is_locked? %>
<p><%= link_to "Reply &raquo;".html_safe, new_forum_post_path(:topic_id => @forum_topic.id), :id => "new-response-link" %></p>
<div style="display: none;" id="topic-response">
<%= render "forum_posts/partials/new/form", :forum_post => ForumPost.new(:topic_id => @forum_topic.id) %>
</div>
<% end %>
<% end %>
<%= numbered_paginator(@forum_posts) %>
</div>
</div>
<%= render "secondary_links" %>
<%= content_for(:page_title) do %>
Forum - <%= @forum_topic.title %> - <%= Danbooru.config.app_name %>
<% end %>
<%= content_for(:html_header) do %>
<%= auto_discovery_link_tag(:atom, {format: :atom}, {title: @forum_topic.title}) %>
<script>
$(function() {
$("#new-response-link").click(function(e) {
$("#topic-response").show();
$('html, body').animate({
scrollTop: $("#forum_post_body").offset().top - 100
}, 500);
e.preventDefault();
})
});
</script>
<% end %>