use time helper for ago.js
This commit is contained in:
@@ -18,9 +18,13 @@
|
||||
<% if last_thread = f.threads.last %>
|
||||
<% last_reply = Threadreply.where(forumthread: f.threads).order(:created_at).last %>
|
||||
<% if last_reply && last_reply.created_at > last_thread.created_at %>
|
||||
<%= last_reply.author.name %> <%= link_to "replied", forumthread_path(last_reply.thread) + "#reply-#{last_reply.id}" %> <time title="<%= last_reply.created_at.strftime("%e %b %Y, %H:%M") %>" datetime="<%= last_reply.created_at.to_datetime.rfc3339 %>"><%= last_reply.created_at.strftime("%e %b %Y, %H:%M") %></time>.
|
||||
<%= last_reply.author.name %>
|
||||
<%= link_to "replied", forumthread_path(last_reply.thread) + "#reply-#{last_reply.id}" %>
|
||||
<%= time last_reply.created_at %>.
|
||||
<% else %>
|
||||
<%= last_thread.author.name %> <%= link_to "posted", forumthread_path(last_thread) %> <time title="<%= last_thread.created_at.strftime("%e %b %Y, %H:%M") %>" datetime="<%= last_thread.created_at.to_datetime.rfc3339 %>"><%= last_thread.created_at.strftime("%e %b %Y, %H:%M") %></time>.
|
||||
<%= last_thread.author.name %>
|
||||
<%= link_to "posted", forumthread_path(last_thread) %>
|
||||
<%= time last_thread.created_at %>.
|
||||
<% end %>
|
||||
<% else %>
|
||||
No posts yet.
|
||||
|
||||
Reference in New Issue
Block a user