diff --git a/app/assets/stylesheets/sections/events.scss b/app/assets/stylesheets/sections/events.scss index 9b049aed5fb889813d7ba34b376ed0590f6888f1..d94d97c8d9aa893490572e04898ab1bf532c46e3 100644 --- a/app/assets/stylesheets/sections/events.scss +++ b/app/assets/stylesheets/sections/events.scss @@ -35,6 +35,13 @@ padding-top: 0; } + &.event-inline { + .avatar { + width: 16px; + height: 16px; + } + } + padding: 14px 0px; border-bottom: 1px solid #eee; .event-title { diff --git a/app/models/event.rb b/app/models/event.rb index 759e84bb55a8458ed176f34b2289bf1e65c7d91d..5c7c5be4190a7e995389b7cf57afb812097cb265 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -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 diff --git a/app/views/events/_event.html.haml b/app/views/events/_event.html.haml index b090148685fdaeda067465cfb219e6823fd18a28..b3543460d65dfabd2f6808021e8853fb54a03c65 100644 --- a/app/views/events/_event.html.haml +++ b/app/views/events/_event.html.haml @@ -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.