cleaned up, added threadreplies, added info

This commit is contained in:
jomo
2014-04-20 03:07:39 +02:00
parent 097f9b1ba4
commit cbafa3c46a
24 changed files with 354 additions and 132 deletions
+6 -5
View File
@@ -14,11 +14,12 @@
</div>
<div id="replies">
<h3><%= "#{pluralize(@thread.replies.length, 'reply')}." %></h3>
<% @thread.replies.each do |c| %>
Reply<%# render "threadreplies/reply", :c => c %>
<% @thread.replies.each do |reply| %>
<%= render partial: "threadreplies/reply", locals: {reply: reply} %>
<% end %>
<% unless @thread.can_read?(current_user) %>
new
<%# render "threadreplies/new" %>
<% if @thread.can_write?(current_user) %>
<%= render partial: "threadreplies/new", locals: {reply: Threadreply.new(forumthread: @thread)} %>
<% else %>
You cannot reply here.
<% end %>
</div>