2 def changeset_time_ago(changeset)
4 created_at = distance_of_time_in_words_to_now(changeset.created_at)
5 closed_at = distance_of_time_in_words_to_now(changeset.closed_at)
6 if created_at == closed_at
7 out << t('browse.changeset_details.closed_at') + ' '
8 both_times = t('browse.changeset_details.created_at') + ': ' + l(changeset.created_at)
10 both_times << t('browse.changeset_details.closed_at') + ': ' + l(changeset.closed_at)
11 out << content_tag(:abbr, t('browse.changeset_details.ago', :ago => created_at), title: both_times.html_safe)
13 out << t('browse.changeset_details.created_at') + ' '
14 out << content_tag(:abbr, t('browse.changeset_details.ago', :ago => created_at), title: l(changeset.created_at))
15 out << t('browse.changeset_details.closed_at') + ' '
16 out << content_tag(:abbr, t('browse.changeset_details.ago', :ago => closed_at), title: l(changeset.closed_at))
18 if changeset.user.data_public?
19 out << ' ' + t('browse.changeset_details.by') + ' '
20 out << link_to(h(changeset.user.display_name), :controller => "user", :action => "view", :display_name => changeset.user.display_name)