Permalink
Browse files

Show latest activity on threads in more places.

  • Loading branch information...
1 parent 2e8f7bb commit 32696e7fe6d6de1512d34c9abfa094f3542c2645 @gravitystorm gravitystorm committed May 16, 2012
@@ -136,6 +136,10 @@ def latest_activity_at
messages.empty? ? updated_at : messages.last.updated_at
end
+ def latest_activity_by
+ messages.empty? ? created_by : messages.last.created_by
+ end
+
def upcoming_deadline_messages
messages.except(:order).joins("JOIN deadline_messages dm ON messages.component_id = dm.id").
where("messages.component_type = 'DeadlineMessage'").
@@ -6,6 +6,6 @@
- if thread.group
= link_to_profile(thread.group)
%br
- = link_to_profile(thread.created_by)
- = t ".created_at", time_ago: time_ago_in_words(thread.created_at)
+ = link_to_profile(thread.latest_activity_by)
+ = t ".posted_at", time_ago: time_ago_in_words(thread.latest_activity_at)
.permissions= thread_type(thread)
@@ -6,8 +6,8 @@
- if thread.group
= link_to_profile(thread.group)
%br
- = link_to_profile(thread.created_by)
- = t ".created_at", time_ago: time_ago_in_words(thread.created_at)
+ = link_to_profile(thread.latest_activity_by)
+ = t ".posted_at", time_ago: time_ago_in_words(thread.latest_activity_at)
.status
= thread.following_status
.permissions= thread_type(thread)
@@ -393,13 +393,13 @@
group_public: "Group Public"
group_private: "Group Private"
public: "Public"
- created_at: "%{time_ago} ago"
+ posted_at: "posted %{time_ago} ago"
list:
group_committee: "Group Committee"
group_public: "Group Public"
group_private: "Group Private"
public: "Public"
- created_at: "%{time_ago} ago"
+ posted_at: "posted %{time_ago} ago"
edit:
title: "Edit thread"
description_html:

0 comments on commit 32696e7

Please sign in to comment.