Commit 63345756 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Differentiate between event types

parent b90f83e9
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
*/ */
.event-item { .event-item {
font-size: $gl-font-size; font-size: $gl-font-size;
padding: $gl-padding; padding: $gl-padding 0;
border-bottom: 1px solid $white-normal; border-bottom: 1px solid $white-normal;
color: $list-text-color; color: $list-text-color;
...@@ -25,6 +25,11 @@ ...@@ -25,6 +25,11 @@
color: $list-text-color; color: $list-text-color;
} }
.event-icon {
display: inline-block;
margin: 0 10px;
}
svg { svg {
height: 16px; height: 16px;
width: 16px; width: 16px;
......
...@@ -4,13 +4,10 @@ ...@@ -4,13 +4,10 @@
#{time_ago_with_tooltip(event.created_at)} #{time_ago_with_tooltip(event.created_at)}
- if event.created_project? - if event.created_project?
= custom_icon("icon_status_open")
= render "events/event/created_project", event: event = render "events/event/created_project", event: event
- elsif event.push? - elsif event.push?
= custom_icon("icon_commit")
= render "events/event/push", event: event = render "events/event/push", event: event
- elsif event.commented? - elsif event.commented?
= custom_icon("comment_o")
= render "events/event/note", event: event = render "events/event/note", event: event
- else - else
= render "events/event/common", event: event = render "events/event/common", event: event
- if event.target - if event.target
- if event.target_type == "MergeRequest" - if event.action_name == "opened"
- if event.action_name == "opened" .event-icon.open-icon
= custom_icon("icon_status_open") = custom_icon("icon_status_open")
- elsif event.action_name == "closed" - elsif event.action_name == "closed"
= custom_icon("icon_status_closed") .event-icon.closed-icon
- else = custom_icon("icon_status_closed")
= custom_icon("code_fork") - else
.event-icon.fork-icon
= custom_icon("code_fork")
.event-title .event-title
%span{ class: event.action_name } %span{ class: event.action_name }
......
.event-icon.open-icon
= custom_icon("icon_status_open")
.event-title .event-title
%span.author_name= link_to_author event
%span{ class: event.action_name } %span{ class: event.action_name }
= event_action_name(event) = event_action_name(event)
......
.event-icon
= custom_icon("comment_o")
.event-title .event-title
%span.author_name= link_to_author event
= event.action_name = event.action_name
= event_note_title_html(event) = event_note_title_html(event)
......
- project = event.project - project = event.project
.event-icon
= custom_icon("icon_commit")
.event-title .event-title
%span.author_name= link_to_author event
%span.pushed #{event.action_name} #{event.ref_type} %span.pushed #{event.action_name} #{event.ref_type}
%strong %strong
- commits_link = namespace_project_commits_path(project.namespace, project, event.ref_name) - commits_link = namespace_project_commits_path(project.namespace, project, event.ref_name)
...@@ -48,4 +50,3 @@ ...@@ -48,4 +50,3 @@
.event-body .event-body
%ul.well-list.event_commits %ul.well-list.event_commits
= render "events/commit", commit: last_commit, project: project, event: event = render "events/commit", commit: last_commit, project: project, event: event
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment