fixed date formatting
This commit is contained in:
@@ -11,10 +11,10 @@ class Ability
|
||||
can :read, Topic, :forum => { :state => true, :category => { :state => true } }
|
||||
can :read, Post, :topic => { :forum => { :state => true, :category => { :state => true } } }
|
||||
|
||||
can :update, Post, :user_id => user.id
|
||||
can :destroy, [Topic,Post], :user_id => user.id
|
||||
can :update, Post, :user_id => user.id, :topic => { :locked => false }
|
||||
can :destroy, [Topic,Post], :user_id => user.id, :topic => { :locked => false }
|
||||
|
||||
can :create, Post unless user.new_record?
|
||||
can :create, Post, :topic => { :locked => false } unless user.new_record?
|
||||
can :create, Topic unless user.new_record?
|
||||
end
|
||||
end
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<td class="counts smaller"><%= forum.posts.size - forum.topics.size %></td>
|
||||
<td class="last_post smaller">
|
||||
<% if forum.posts.size > 0 %>
|
||||
<%= forum.posts.last.created_at %><br />
|
||||
<%=l forum.posts.last.created_at %><br />
|
||||
<%= forum.posts.last.user.username %>
|
||||
<% else %>
|
||||
No Topics / Posts
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="right controls"><%= link_to "Back to Forum List", forums_path if can? :create, Forum %></div>
|
||||
<div class="right controls"><%= link_to "Back to Forum List", forums_path %></div>
|
||||
<div class="module">
|
||||
<div class="module_header">
|
||||
<%= @forum.title %>
|
||||
@@ -37,7 +37,7 @@
|
||||
<td class="counts smaller"><%= topic.posts.size - 1 %></td>
|
||||
<td class="counts smaller"><%= topic.hits %></td>
|
||||
<td class="last_post smaller">
|
||||
<%= topic.posts.last.created_at %><br />
|
||||
<%=l topic.posts.last.created_at %><br />
|
||||
by <%= topic.posts.last.user.username %>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -45,4 +45,4 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right controls"><p><%= link_to "Back to Forum List", forums_path if can? :create, Forum %></p></div>
|
||||
<div class="right controls"><p><%= link_to "Back to Forum List", forums_path %></p></div>
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
<span class="info smaller">
|
||||
<p><strong><%= "Administrator" if post.user.admin? %></strong></p>
|
||||
Posts <%= post.user.posts.size %><br />
|
||||
Registered <%= post.user.created_at.to_s(:joined) %><br />
|
||||
Registered <%=l post.user.created_at, :format => :joined %><br />
|
||||
</span>
|
||||
</td>
|
||||
<td class="post_header">
|
||||
<span class="left post_date smaller">Posted <%= post.created_at %></span>
|
||||
<span class="left post_date smaller">Posted <%=l post.created_at %></span>
|
||||
<span class="right controls">
|
||||
<%= link_to "Reply", new_topic_post_path(@topic) if can? :create, Topic %>
|
||||
<%= link_to "Quote", new_topic_post_path(@topic, :quote => post) if can? :create, Topic %>
|
||||
<%= link_to "Reply", new_topic_post_path(@topic) if can? :create, @topic.posts.new %>
|
||||
<%= link_to "Quote", new_topic_post_path(@topic, :quote => post) if can? :create, @topic.posts.new %>
|
||||
<%= link_to "Edit", edit_post_path(post) if can? :update, post %>
|
||||
<%= link_to "Delete", post, :confirm => "Are you sure?", :method => :delete if can? :destroy, post %>
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user