Fixed topcis#show
This commit is contained in:
@@ -12,31 +12,33 @@
|
|||||||
<div>
|
<div>
|
||||||
<table>
|
<table>
|
||||||
<% @topic.posts.each do |post| %>
|
<% @topic.posts.each do |post| %>
|
||||||
<tr>
|
<% if !post.user.blank? %>
|
||||||
<td class="post_author" rowspan="2">
|
<tr>
|
||||||
<span class="name"><%= post.user.username %></span>
|
<td class="post_author" rowspan="2">
|
||||||
<span class="avatar"><%= image_tag post.user.gravatar_url %></span>
|
<span class="name"><%= post.user.username %></span>
|
||||||
<span class="info smaller">
|
<span class="avatar"><%= image_tag post.user.gravatar_url %></span>
|
||||||
<p><strong><%= "Administrator" if post.user.admin? %></strong></p>
|
<span class="info smaller">
|
||||||
Posts <%= post.user.posts.size %><br />
|
<p><strong><%= "Administrator" if post.user.admin? %></strong></p>
|
||||||
Registered <%=l post.user.created_at %><br />
|
Posts <%= post.user.posts_count %><br />
|
||||||
</span>
|
Registered <%=l post.user.created_at %><br />
|
||||||
</td>
|
</span>
|
||||||
<td class="post_header">
|
</td>
|
||||||
<span class="left post_date smaller">Posted <%=l post.created_at %></span>
|
<td class="post_header">
|
||||||
<span class="right controls">
|
<span class="left post_date smaller">Posted <%=l post.created_at %></span>
|
||||||
<%= link_to "Reply", new_topic_post_path(@topic) if can? :create, @topic.posts.new %>
|
<span class="right controls">
|
||||||
<%= link_to "Quote", new_topic_post_path(@topic, :quote => post) if can? :create, @topic.posts.new %>
|
<%= link_to "Reply", new_topic_post_path(@topic) if can? :create, @topic.posts.new %>
|
||||||
<%= link_to "Edit", edit_post_path(post) if can? :update, post %>
|
<%= link_to "Quote", new_topic_post_path(@topic, :quote => post) if can? :create, @topic.posts.new %>
|
||||||
<%= link_to "Delete", post, :confirm => "Are you sure?", :method => :delete if can? :destroy, post %>
|
<%= link_to "Edit", edit_post_path(post) if can? :update, post %>
|
||||||
</span>
|
<%= link_to "Delete", post, :confirm => "Are you sure?", :method => :delete if can? :destroy, post %>
|
||||||
</td>
|
</span>
|
||||||
</tr>
|
</td>
|
||||||
<tr>
|
</tr>
|
||||||
<td class="post_body">
|
<tr>
|
||||||
<%= post.body.bbcode_to_html().html_safe %>
|
<td class="post_body">
|
||||||
</td>
|
<%= post.body.bbcode_to_html().html_safe %>
|
||||||
</tr>
|
</td>
|
||||||
|
</tr>
|
||||||
|
<%end%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user