fixed date formatting

This commit is contained in:
Mike Kelley
2011-08-27 12:56:36 -06:00
parent 1c65d376de
commit 5a77a3a681
9 changed files with 20 additions and 16 deletions

View File

@@ -43,13 +43,13 @@ GEM
gravtastic (3.2.0)
hirb (0.5.0)
i18n (0.5.0)
kgio (2.4.1)
mail (2.2.19)
activesupport (>= 2.3.6)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
nifty-generators (0.4.6)
orm_adapter (0.0.5)
polyglot (0.3.2)
rack (1.2.3)
@@ -79,6 +79,9 @@ GEM
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.29)
unicorn (3.6.2)
kgio (~> 2.3)
rack
warden (1.0.5)
rack (>= 1.0)
@@ -92,6 +95,6 @@ DEPENDENCIES
forum_monster (~> 1.1)
gravtastic
hirb
nifty-generators
rails (= 3.0.9)
sqlite3
unicorn

View File

@@ -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

View File

@@ -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

View File

@@ -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>

View File

@@ -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>

View File

@@ -4,4 +4,5 @@
en:
time:
formats:
default: "%B %d, %Y"
default: "%B %d, %Y @ %I:%M %p"
joined: "%B %d, %Y"

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

View File

@@ -39,7 +39,7 @@ table a { font-weight:bold; }
#header #menu_wrapper {
width:100%;
background:url('http://www.stripemania.com/cache/3-2-45-1-020202-1-1A1A1A-DDEE1E-DDEE1E-DDEE1E-DDEE1E-272727-78D316-78D316-78D316-78D316-yes-yes-yes-yes-yes-.png');
background:url('/images/black_stripe.png');
}
#header #menu_wrapper ul {
@@ -66,7 +66,7 @@ table a { font-weight:bold; }
}
.module_header {
background:url('http://www.stripemania.com/cache/3-2-45-1-020202-1-1A1A1A-DDEE1E-DDEE1E-DDEE1E-DDEE1E-272727-78D316-78D316-78D316-78D316-yes-yes-yes-yes-yes-.png') !important;
background:url('/images/white_stripe.png') !important;
}
#info_box {