Fix event rendering for certain event types

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2016-03-31 12:38:44 +02:00
parent 6985e7dbf9
commit c27b578240
No known key found for this signature in database
GPG Key ID: 627C5F589F467F17
2 changed files with 9 additions and 1 deletions

View File

@ -214,4 +214,12 @@ module EventsHelper
end
end
end
def event_row_class(event)
if event.body? || event.created_project?
"event-block"
else
"event-inline"
end
end
end

View File

@ -1,5 +1,5 @@
- if event.visible_to_user?(current_user)
.event-item{class: "#{event.body? ? "event-block" : "event-inline" }"}
.event-item{ class: event_row_class(event) }
.event-item-timestamp
#{time_ago_with_tooltip(event.created_at)}