Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-04-11 21:24:04 +0300
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-04-11 21:47:41 +0300
commit466ca12ee4b3b76f66c4454e7387cfd841d88262 (patch)
tree81ab088797cd9ba2e356875615bdd0bd39b1111a /app/views/events
parent71b7461f371c2257d85ab05c8463e440f569053d (diff)
Add helper for using avatars vs icons
Diffstat (limited to 'app/views/events')
-rw-r--r--app/views/events/event/_common.html.haml8
-rw-r--r--app/views/events/event/_created_project.html.haml8
-rw-r--r--app/views/events/event/_note.html.haml7
-rw-r--r--app/views/events/event/_push.html.haml8
4 files changed, 5 insertions, 26 deletions
diff --git a/app/views/events/event/_common.html.haml b/app/views/events/event/_common.html.haml
index b7cb5d3ed63..01e72862114 100644
--- a/app/views/events/event/_common.html.haml
+++ b/app/views/events/event/_common.html.haml
@@ -1,10 +1,4 @@
-- if current_path?('users#show')
- - if event.target
- .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)
+= icon_for_profile_event(event)
.event-title
%span.author_name= link_to_author event
diff --git a/app/views/events/event/_created_project.html.haml b/app/views/events/event/_created_project.html.haml
index c08c9442fa9..d8e59be57bb 100644
--- a/app/views/events/event/_created_project.html.haml
+++ b/app/views/events/event/_created_project.html.haml
@@ -1,10 +1,4 @@
-- if current_path?('users#show')
- .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)
-
+= icon_for_profile_event(event)
.event-title
%span.author_name= link_to_author event
diff --git a/app/views/events/event/_note.html.haml b/app/views/events/event/_note.html.haml
index d5dcc9339ac..df4b9562215 100644
--- a/app/views/events/event/_note.html.haml
+++ b/app/views/events/event/_note.html.haml
@@ -1,9 +1,4 @@
-- if current_path?('users#show')
- .system-note-image
- = icon_for_system_note(event.action_name)
-- else
- .system-note-image.user-avatar
- = author_avatar(event, size: 32)
+= icon_for_profile_event(event)
.event-title
%span.author_name= link_to_author event
diff --git a/app/views/events/event/_push.html.haml b/app/views/events/event/_push.html.haml
index be0eb6cb5ee..c0943100ae3 100644
--- a/app/views/events/event/_push.html.haml
+++ b/app/views/events/event/_push.html.haml
@@ -1,10 +1,6 @@
- project = event.project
-- if current_path?('users#show')
- .system-note-image
- = icon_for_system_note(event.data[:event_name])
-- else
- .system-note-image.user-avatar
- = author_avatar(event, size: 32)
+
+= icon_for_profile_event(event)
.event-title
%span.author_name= link_to_author event