time_ago_in_words_label: put "ago" in the text since it's used everywhere

closes #222
This commit is contained in:
joshua stein 2015-09-23 13:24:47 -05:00
parent 22ac65d224
commit 2a30511117
7 changed files with 9 additions and 11 deletions

View file

@ -68,6 +68,6 @@ module ApplicationHelper
ago.gsub!(/^about /, "")
end
raw(label_tag(nil, ago, :title => time.strftime("%F %T %z")))
raw(label_tag(nil, "#{ago} ago", :title => time.strftime("%F %T %z")))
end
end

View file

@ -62,7 +62,7 @@ class="comment <%= comment.current_vote ? (comment.current_vote[:vote] == 1 ?
e-mailed
<% end %>
<%= time_ago_in_words_label((comment.has_been_edited? ?
comment.updated_at : comment.created_at), :strip_about => true) %> ago
comment.updated_at : comment.created_at), :strip_about => true) %>
<% end %>
<% if !comment.previewing %>

View file

@ -42,7 +42,7 @@
<a href="/u/<%= message.recipient.username %>"><%=
message.recipient.username %></a>
<% end %></td>
<td><%= time_ago_in_words_label(message.created_at) %> ago</td>
<td><%= time_ago_in_words_label(message.created_at) %></td>
<td><a href="/messages/<%= message.short_id %>"><%= message.subject
%></a></td>
</tr>

View file

@ -1,7 +1,7 @@
<% if f.object.errors.count == 1 && f.object.already_posted_story %>
<div class="flash-error">
<h2>Error: This story was already submitted <%=
time_ago_in_words(f.object.already_posted_story.created_at) %> ago</h2>
time_ago_in_words(f.object.already_posted_story.created_at) %></h2>
<p>
Please view the <a href="<%= f.object.already_posted_story.comments_path %>"
target="_blank">previous discussion</a> for this story.
@ -12,7 +12,7 @@
<% elsif !f.object.errors.any? && f.object.already_posted_story %>
<div class="flash-notice">
<h2>Note: This story was already submitted <%=
time_ago_in_words(f.object.already_posted_story.created_at) %> ago, but may
time_ago_in_words(f.object.already_posted_story.created_at) %>, but may
be submitted again.</h2>
<p>
Please view the <a href="<%= f.object.already_posted_story.comments_path %>"

View file

@ -72,7 +72,6 @@ class="story <%= story.vote && story.vote[:vote] == 1 ? "upvoted" : "" %>
ms.html_class_for_user(@user) %>"><%= ms.user.username %></a>
<%= time_ago_in_words_label(ms.created_at, :strip_about => true) %>
ago
</span>
<% end %>
<% end %>
@ -106,7 +105,6 @@ class="story <%= story.vote && story.vote[:vote] == 1 ? "upvoted" : "" %>
story.html_class_for_user(@user) %>"><%= story.user.username %></a>
<%= time_ago_in_words_label(story.created_at, :strip_about => true) %>
ago
<% if story.is_editable_by_user?(@user) %>
|

View file

@ -12,7 +12,7 @@
<% if @story.is_unavailable && @story.story_cache.present? %>
<a id="story_text_expander">Source URL considered unavailable as of <%=
time_ago_in_words_label(@story.unavailable_at) %> ago, cached text
time_ago_in_words_label(@story.unavailable_at) %>, cached text
available</a>
<div id="collapsed_story_text">
<p>

View file

@ -38,7 +38,7 @@
<label class="required">Joined:</label>
<span class="d">
<%= time_ago_in_words_label(@showing_user.created_at) %> ago
<%= time_ago_in_words_label(@showing_user.created_at) %>
<% if @showing_user.invited_by_user %>
by invitation from
<%= link_to @showing_user.invited_by_user.try(:username),
@ -50,7 +50,7 @@
<% if @showing_user.is_banned? %>
<label class="required">Banned:</label>
<span class="d">
<%= time_ago_in_words_label(@showing_user.banned_at) %> ago
<%= time_ago_in_words_label(@showing_user.banned_at) %>
<% if @showing_user.banned_by_user %>
by <%= link_to @showing_user.banned_by_user.try(:username),
@showing_user.banned_by_user %>:
@ -73,7 +73,7 @@
<% if @showing_user.deleted_at? %>
<label class="required">Left:</label>
<span class="d">
<%= time_ago_in_words_label(@showing_user.deleted_at) %> ago
<%= time_ago_in_words_label(@showing_user.deleted_at) %>
</span>
<br>
<% end %>