diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb index d3e5e3aa8b9..a36b13a7db5 100644 --- a/app/helpers/events_helper.rb +++ b/app/helpers/events_helper.rb @@ -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 diff --git a/app/views/events/_event.html.haml b/app/views/events/_event.html.haml index 42c2764e7e2..4d20dd5830e 100644 --- a/app/views/events/_event.html.haml +++ b/app/views/events/_event.html.haml @@ -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)}