Commit 25e629e460c30bb903be52dbf28fcc499566f318
1 parent
9174020f
Exists in
master
and in
4 other branches
Render small avatars for inline events
Showing
3 changed files
with
18 additions
and
1 deletions
Show diff stats
app/assets/stylesheets/sections/events.scss
| @@ -35,6 +35,13 @@ | @@ -35,6 +35,13 @@ | ||
| 35 | padding-top: 0; | 35 | padding-top: 0; |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | + &.event-inline { | ||
| 39 | + .avatar { | ||
| 40 | + width: 16px; | ||
| 41 | + height: 16px; | ||
| 42 | + } | ||
| 43 | + } | ||
| 44 | + | ||
| 38 | padding: 14px 0px; | 45 | padding: 14px 0px; |
| 39 | border-bottom: 1px solid #eee; | 46 | border-bottom: 1px solid #eee; |
| 40 | .event-title { | 47 | .event-title { |
app/models/event.rb
| @@ -291,4 +291,14 @@ class Event < ActiveRecord::Base | @@ -291,4 +291,14 @@ class Event < ActiveRecord::Base | ||
| 291 | "Wall" | 291 | "Wall" |
| 292 | end.downcase | 292 | end.downcase |
| 293 | end | 293 | end |
| 294 | + | ||
| 295 | + def body? | ||
| 296 | + if push? | ||
| 297 | + push_with_commits? | ||
| 298 | + elsif note? | ||
| 299 | + true | ||
| 300 | + else | ||
| 301 | + target.respond_to? :title | ||
| 302 | + end | ||
| 303 | + end | ||
| 294 | end | 304 | end |
app/views/events/_event.html.haml