Files
danbooru/app/views/forum_topics/show.html.erb
2013-03-19 23:11:58 +11:00

48 lines
1.2 KiB
Plaintext

<div id="c-forum-topics">
<div id="a-show">
<h1>
Topic: <%= @forum_topic.title %>
<% if @forum_topic.is_deleted? %>
(deleted)
<% end %>
</h1>
<% 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 %>
<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/form", :forum_post => ForumPost.new(:topic_id => @forum_topic.id) %>
</div>
<%= 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 %>
<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 %>