rename time helper to ago
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<%= link_to(p.author.avatar(64), p.author, title: p.author.ign) %>
|
||||
<%= render partial: "users/username", locals: { user: p.author } %>
|
||||
<%= link_to p do %>
|
||||
<%= time p.created_at %>
|
||||
<%= ago p.created_at %>
|
||||
<% end %>
|
||||
<span class="comment-counter">
|
||||
<%= link_to pluralize(p.comments.count, "Comment"), p %>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<%= link_to(@post.author.avatar(64), @post.author, title: @post.author.ign) %>
|
||||
<%= render partial: "users/username", locals: { user: @post.author } %>
|
||||
<%= link_to p do %>
|
||||
<%= time @post.created_at %>
|
||||
<%= ago @post.created_at %>
|
||||
<% end %>
|
||||
<%= link_to "edit", edit_blogpost_path(@post.id), class: "editlink" if mod? %>
|
||||
<div class="clear-right"></div>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<%= link_to(c.author.avatar(64), c.author, title: c.author.ign) %>
|
||||
<%= render partial: "users/username", locals: { user: c.author } %>
|
||||
<%= link_to "#comment-#{c.id}" do %>
|
||||
<%= time c.created_at %>
|
||||
<%= ago c.created_at %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to "edit", edit_blogpost_comment_path(c.blogpost, c), class: "editlink" if (mod? || c.author.is?(current_user)) %>
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
<% 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 last_reply.created_at %>.
|
||||
<%= ago last_reply.created_at %>.
|
||||
<% else %>
|
||||
<%= last_thread.author.name %>
|
||||
<%= link_to "posted", forumthread_path(last_thread) %>
|
||||
<%= time last_thread.created_at %>.
|
||||
<%= ago last_thread.created_at %>.
|
||||
<% end %>
|
||||
<% else %>
|
||||
No posts yet.
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<%= link_to(thread.author.avatar(64), thread.author, title: thread.author.ign) %>
|
||||
<%= render partial: "users/username", locals: { user: thread.author } %>
|
||||
<%= link_to thread do %>
|
||||
<%= time thread.created_at %>
|
||||
<%= ago thread.created_at %>
|
||||
<% end %>
|
||||
<span class="comment-counter">
|
||||
<%= link_to pluralize(thread.replies.count, "Reply"), thread %>
|
||||
@@ -27,7 +27,7 @@
|
||||
<% if rpl = thread.replies.last %>
|
||||
<%= rpl.author.name %>
|
||||
<%= link_to "replied", forumthread_path(thread) + "#reply-#{rpl.id}" %>
|
||||
<%= time rpl.created_at %>.
|
||||
<%= ago rpl.created_at %>.
|
||||
<% else %>
|
||||
No replies yet.
|
||||
<% end %>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<%= link_to(@thread.author.avatar(64), @thread.author, title: @thread.author.ign) %>
|
||||
<%= render partial: "users/username", locals: { user: @thread.author } %>
|
||||
<%= link_to p do %>
|
||||
<%= time @thread.created_at %>
|
||||
<%= ago @thread.created_at %>
|
||||
<% end %>
|
||||
<%= link_to "edit", edit_forumthread_path( @thread), class: "editlink" if (@thread.author.is?(current_user) || mod?) %>
|
||||
<div class="clear-right"></div>
|
||||
@@ -14,7 +14,7 @@
|
||||
<div class="items">
|
||||
<% if @thread.edited? %>
|
||||
<div class="item edited">
|
||||
Last edited <%= time @thread.updated_at %> by <%= link_to @thread.editor.name, @thread.editor %>.
|
||||
Last edited <%= ago @thread.updated_at %> by <%= link_to @thread.editor.name, @thread.editor %>.
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="item content">
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<%= link_to blogposts_path, class: ("active" if con == "blogposts" || con == "comments") do %>
|
||||
News
|
||||
<% if last_post = Blogpost.last %>
|
||||
<div class="subtitle"><%= time last_post.created_at %></div>
|
||||
<div class="subtitle"><%= ago last_post.created_at %></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<%= link_to(reply.author.avatar(64), reply.author, title: reply.author.ign) %>
|
||||
<%= render partial: "users/username", locals: { user: reply.author } %>
|
||||
<%= link_to "#reply-#{reply.id}" do %>
|
||||
<%= time reply.created_at %>
|
||||
<%= ago reply.created_at %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to "edit", edit_forumthread_threadreply_path(reply.thread, reply), class: "editlink" if mod? || reply.author.is?(current_user) %>
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<% end %>
|
||||
<tr>
|
||||
<td><b>Joined</b></td>
|
||||
<td><%= time @user.created_at %></td>
|
||||
<td><%= ago @user.created_at %></td>
|
||||
</tr>
|
||||
<% if mod? || @user.is?(current_user) %>
|
||||
<tr>
|
||||
@@ -82,7 +82,7 @@
|
||||
<td><b>Last seen</b></td>
|
||||
<td>
|
||||
<% if @user.last_seen %>
|
||||
<%= time @user.last_seen %>
|
||||
<%= ago @user.last_seen %>
|
||||
<% else %>
|
||||
Never
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user