relative timestamps

This commit is contained in:
jomo
2014-05-02 05:12:16 +02:00
parent 04066ba49f
commit a2ac6582b1
14 changed files with 70 additions and 23 deletions

View File

@@ -5,7 +5,7 @@
<div class="item-group with-avatar" id="post-<%= p.id %>">
<div class="header">
<%= link_to(p.author.avatar(64), p.author, title: p.author.ign) %>
<%= render partial: "users/username", locals: { user: p.author } %> <time><%= link_to p.created_at.strftime("%e. %b %Y, %H:%M"), p %></time>
<%= render partial: "users/username", locals: { user: p.author } %> <%= link_to p do %><time datetime="<%= p.created_at.to_datetime.rfc3339 %>"><%= p.created_at.strftime("%e %b %Y, %H:%M") %></time><% end %>
<span class="comment-counter">
<%= link_to pluralize(p.comments.count, "Comment"), p %>
</span>