Permalink
Browse files

Added check to determine if topic can be replied to

  • Loading branch information...
1 parent 1375b7b commit cb7220754ac454f9dbe55b6f9fa1a0aaf09cf20d Joshua Clayton committed Nov 9, 2008
Showing with 2 additions and 2 deletions.
  1. +1 −1 app/presenters/topic_presenter.rb
  2. +1 −1 app/views/topics/show.html.erb
View
2 app/presenters/topic_presenter.rb
@@ -19,7 +19,7 @@ def can_be_stickied_by_current_user?
is_current_user_admin?
end
- def can_be_replied_by_current_user?
+ def can_be_replied_to_by_current_user?
!@topic.locked? && @current_user
end
View
2 app/views/topics/show.html.erb
@@ -3,4 +3,4 @@
<% content :full do %>
<%= render :partial => "posts/recordset", :locals => {:posts => @topic.posts} %>
<% end %>
-<%= render :partial => "posts/reply_slider", :locals => {:forum => @forum, :topic => @topic} %>
+<%= render :partial => "posts/reply_slider", :locals => {:forum => @forum, :topic => @topic} if @topic.can_be_replied_to_by_current_user? %>

0 comments on commit cb72207

Please sign in to comment.