Render small avatars for inline events

This commit is contained in:
Dmitriy Zaporozhets 2013-08-20 21:31:37 +03:00
parent 9174020f14
commit 25e629e460
3 changed files with 18 additions and 1 deletions

View File

@ -35,6 +35,13 @@
padding-top: 0;
}
&.event-inline {
.avatar {
width: 16px;
height: 16px;
}
}
padding: 14px 0px;
border-bottom: 1px solid #eee;
.event-title {

View File

@ -291,4 +291,14 @@ class Event < ActiveRecord::Base
"Wall"
end.downcase
end
def body?
if push?
push_with_commits?
elsif note?
true
else
target.respond_to? :title
end
end
end

View File

@ -1,5 +1,5 @@
- if event.proper?
%div.event-item
.event-item{class: "#{event.body? ? "event-block" : "event-inline" }"}
%span.cgray.pull-right
#{time_ago_in_words(event.created_at)} ago.