summaryrefslogtreecommitdiff
path: root/app/views/events
diff options
context:
space:
mode:
authorAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-04-11 12:32:42 -0500
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-04-11 12:32:42 -0500
commit71b7461f371c2257d85ab05c8463e440f569053d (patch)
tree51f8862cf68354d7fdf3b6935fb449563c03ece0 /app/views/events
parentd4c5dc49e0e8b419b507369ec33946392eb315be (diff)
downloadgitlab-ce-71b7461f371c2257d85ab05c8463e440f569053d.tar.gz
Reuse system notes helper for profile event icons
Diffstat (limited to 'app/views/events')
-rw-r--r--app/views/events/event/_common.html.haml13
-rw-r--r--app/views/events/event/_created_project.html.haml4
-rw-r--r--app/views/events/event/_note.html.haml2
-rw-r--r--app/views/events/event/_push.html.haml6
4 files changed, 6 insertions, 19 deletions
diff --git a/app/views/events/event/_common.html.haml b/app/views/events/event/_common.html.haml
index 7e18618ab49..b7cb5d3ed63 100644
--- a/app/views/events/event/_common.html.haml
+++ b/app/views/events/event/_common.html.haml
@@ -1,20 +1,11 @@
- if current_path?('users#show')
- if event.target
- - case event.action_name
- - when 'opened'
- .system-note-image.open-icon
- = custom_icon("icon_status_open")
- - when 'closed'
- .system-note-image.closed-icon
- = custom_icon("icon_status_closed")
- - else
- .system-note-image.fork-icon
- = custom_icon("icon_code_fork")
+ .system-note-image{ class: "#{event.action_name}-icon" }
+ = icon_for_system_note(event.action_name)
- else
.system-note-image.user-avatar
= author_avatar(event, size: 32)
-
.event-title
%span.author_name= link_to_author event
%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 653aa16ca00..c08c9442fa9 100644
--- a/app/views/events/event/_created_project.html.haml
+++ b/app/views/events/event/_created_project.html.haml
@@ -1,6 +1,6 @@
- if current_path?('users#show')
- .system-note-image.open-icon
- = custom_icon("icon_status_open")
+ .system-note-image{ class: "#{event.action_name}-icon" }
+ = icon_for_system_note(event.action_name)
- else
.system-note-image.user-avatar
= author_avatar(event, size: 32)
diff --git a/app/views/events/event/_note.html.haml b/app/views/events/event/_note.html.haml
index 8437ace22b5..d5dcc9339ac 100644
--- a/app/views/events/event/_note.html.haml
+++ b/app/views/events/event/_note.html.haml
@@ -1,6 +1,6 @@
- if current_path?('users#show')
.system-note-image
- = custom_icon("icon_comment_o")
+ = icon_for_system_note(event.action_name)
- else
.system-note-image.user-avatar
= author_avatar(event, size: 32)
diff --git a/app/views/events/event/_push.html.haml b/app/views/events/event/_push.html.haml
index d67139777a1..be0eb6cb5ee 100644
--- a/app/views/events/event/_push.html.haml
+++ b/app/views/events/event/_push.html.haml
@@ -1,11 +1,7 @@
- project = event.project
-
- if current_path?('users#show')
.system-note-image
- - if event.action_name == "deleted"
- = custom_icon("trash_o")
- - else
- = custom_icon("icon_commit")
+ = icon_for_system_note(event.data[:event_name])
- else
.system-note-image.user-avatar
= author_avatar(event, size: 32)