gitlab-org--gitlab-foss/app/views/events/_event.html.haml
Jan Provaznik f494587973 Add event presenter
This presenter will be used in an upcoming MR which adds
rendering of epic events on group activity page.
2019-09-10 10:11:38 +00:00

17 lines
577 B
Text

- event = event.present
- if event.visible_to_user?(current_user)
.event-item
.event-item-timestamp
#{time_ago_with_tooltip(event.created_at)}
- if event.created_project_action?
= render "events/event/created_project", event: event
- elsif event.push_action?
= render "events/event/push", event: event
- elsif event.commented_action?
= render "events/event/note", event: event
- else
= render "events/event/common", event: event
- elsif @user&.include_private_contributions?
= render "events/event/private", event: event