diff options
author | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-03-31 23:39:31 +0300 |
---|---|---|
committer | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-04-03 16:34:36 +0300 |
commit | 633457563a9e9ef9473a00019dd243430aa08e80 (patch) | |
tree | b1a4f6c61075454824da9b613c30d3ea9418a03f | |
parent | b90f83e93319d54d558b29838d7453444f3fcf11 (diff) |
Differentiate between event types
-rw-r--r-- | app/assets/stylesheets/pages/events.scss | 7 | ||||
-rw-r--r-- | app/views/events/_event.html.haml | 3 | ||||
-rw-r--r-- | app/views/events/event/_common.html.haml | 14 | ||||
-rw-r--r-- | app/views/events/event/_created_project.html.haml | 4 | ||||
-rw-r--r-- | app/views/events/event/_note.html.haml | 4 | ||||
-rw-r--r-- | app/views/events/event/_push.html.haml | 5 |
6 files changed, 23 insertions, 14 deletions
diff --git a/app/assets/stylesheets/pages/events.scss b/app/assets/stylesheets/pages/events.scss index 14ff6ac9a9a..35571748118 100644 --- a/app/assets/stylesheets/pages/events.scss +++ b/app/assets/stylesheets/pages/events.scss @@ -4,7 +4,7 @@ */ .event-item { font-size: $gl-font-size; - padding: $gl-padding; + padding: $gl-padding 0; border-bottom: 1px solid $white-normal; color: $list-text-color; @@ -25,6 +25,11 @@ color: $list-text-color; } + .event-icon { + display: inline-block; + margin: 0 10px; + } + svg { height: 16px; width: 16px; diff --git a/app/views/events/_event.html.haml b/app/views/events/_event.html.haml index bf7a9af99cd..53a33adc14d 100644 --- a/app/views/events/_event.html.haml +++ b/app/views/events/_event.html.haml @@ -4,13 +4,10 @@ #{time_ago_with_tooltip(event.created_at)} - if event.created_project? - = custom_icon("icon_status_open") = render "events/event/created_project", event: event - elsif event.push? - = custom_icon("icon_commit") = render "events/event/push", event: event - elsif event.commented? - = custom_icon("comment_o") = render "events/event/note", event: event - else = render "events/event/common", event: event diff --git a/app/views/events/event/_common.html.haml b/app/views/events/event/_common.html.haml index 0d230e3f3f2..98a4dda5b4d 100644 --- a/app/views/events/event/_common.html.haml +++ b/app/views/events/event/_common.html.haml @@ -1,11 +1,13 @@ - 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") - - elsif event.action_name == "closed" - = custom_icon("icon_status_closed") - - else - = custom_icon("code_fork") + - elsif event.action_name == "closed" + .event-icon.closed-icon + = custom_icon("icon_status_closed") + - else + .event-icon.fork-icon + = custom_icon("code_fork") .event-title %span{ class: event.action_name } diff --git a/app/views/events/event/_created_project.html.haml b/app/views/events/event/_created_project.html.haml index 80cf2344fe1..6fb084df374 100644 --- a/app/views/events/event/_created_project.html.haml +++ b/app/views/events/event/_created_project.html.haml @@ -1,5 +1,7 @@ +.event-icon.open-icon += custom_icon("icon_status_open") + .event-title - %span.author_name= link_to_author event %span{ class: event.action_name } = event_action_name(event) diff --git a/app/views/events/event/_note.html.haml b/app/views/events/event/_note.html.haml index 64b5a733b77..755750b88d1 100644 --- a/app/views/events/event/_note.html.haml +++ b/app/views/events/event/_note.html.haml @@ -1,5 +1,7 @@ +.event-icon + = custom_icon("comment_o") + .event-title - %span.author_name= link_to_author event = event.action_name = event_note_title_html(event) diff --git a/app/views/events/event/_push.html.haml b/app/views/events/event/_push.html.haml index efd13aabf20..be1730541ef 100644 --- a/app/views/events/event/_push.html.haml +++ b/app/views/events/event/_push.html.haml @@ -1,7 +1,9 @@ - project = event.project +.event-icon + = custom_icon("icon_commit") + .event-title - %span.author_name= link_to_author event %span.pushed #{event.action_name} #{event.ref_type} %strong - commits_link = namespace_project_commits_path(project.namespace, project, event.ref_name) @@ -48,4 +50,3 @@ .event-body %ul.well-list.event_commits = render "events/commit", commit: last_commit, project: project, event: event - |