Use scope for common details and changeset display in browse pages
Refs #2255
This commit is contained in:
parent
47e653ffe0
commit
00f75c175e
3 changed files with 9 additions and 9 deletions
|
@ -12,11 +12,11 @@ module ChangesetsHelper
|
|||
def changeset_details(changeset)
|
||||
if changeset.closed_at > Time.now
|
||||
action = :created
|
||||
time = distance_of_time_in_words_to_now(changeset.created_at)
|
||||
time = time_ago_in_words(changeset.created_at, :scope => :'datetime.distance_in_words_ago')
|
||||
title = l(changeset.created_at)
|
||||
else
|
||||
action = :closed
|
||||
time = distance_of_time_in_words_to_now(changeset.closed_at)
|
||||
time = time_ago_in_words(changeset.closed_at, :scope => :'datetime.distance_in_words_ago')
|
||||
title = "#{t('browse.created')}: #{l(changeset.created_at)} #{t('browse.closed')}: #{l(changeset.closed_at)}".html_safe
|
||||
end
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<div class="details">
|
||||
<%= t "browse.#{common_details.visible? ? :edited : :deleted}_by_html",
|
||||
:time => distance_of_time_in_words_to_now(common_details.timestamp),
|
||||
:time => time_ago_in_words(common_details.timestamp, :scope => :'datetime.distance_in_words_ago'),
|
||||
:user => changeset_user_link(common_details.changeset),
|
||||
:title => l(common_details.timestamp) %>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue