summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-04-10 10:58:41 -0500
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2017-04-10 10:58:41 -0500
commitc7011c88901c7fa8972f02444bd5e3feef698ca4 (patch)
tree6aee9dbf789e3cb04e3cd192f93b959f981a7229
parent9c576cc7e9414e64b4aac0544615e7d5e92c3558 (diff)
downloadgitlab-ce-c7011c88901c7fa8972f02444bd5e3feef698ca4.tar.gz
Use avatars instead of icons in activity view
-rw-r--r--app/assets/stylesheets/pages/events.scss13
-rw-r--r--app/views/events/event/_common.html.haml24
-rw-r--r--app/views/events/event/_created_project.html.haml8
-rw-r--r--app/views/events/event/_note.html.haml8
-rw-r--r--app/views/events/event/_push.html.haml14
5 files changed, 43 insertions, 24 deletions
diff --git a/app/assets/stylesheets/pages/events.scss b/app/assets/stylesheets/pages/events.scss
index 79da490675a..6b5cf394d00 100644
--- a/app/assets/stylesheets/pages/events.scss
+++ b/app/assets/stylesheets/pages/events.scss
@@ -10,10 +10,14 @@
position: relative;
&.event-inline {
- .profile-icon {
+ .system-note-image {
top: 20px;
}
+ .user-avatar {
+ top: 14px;
+ }
+
.event-title,
.event-item-timestamp {
line-height: 40px;
@@ -24,7 +28,7 @@
color: $gl-text-color;
}
- .profile-icon {
+ .system-note-image {
position: absolute;
left: 0;
top: 14px;
@@ -128,8 +132,7 @@
li {
&.commit {
background: transparent;
- padding: 3px;
- padding-left: 0;
+ padding: 0;
border: none;
.commit-row-title {
@@ -183,7 +186,7 @@
max-width: 100%;
}
- .profile-icon {
+ .system-note-image {
display: none;
}
diff --git a/app/views/events/event/_common.html.haml b/app/views/events/event/_common.html.haml
index af97e9588a5..e6bb05e975e 100644
--- a/app/views/events/event/_common.html.haml
+++ b/app/views/events/event/_common.html.haml
@@ -1,13 +1,17 @@
-- if event.target
- - if event.action_name == "opened"
- .profile-icon.open-icon
- = custom_icon("icon_status_open")
- - elsif event.action_name == "closed"
- .profile-icon.closed-icon
- = custom_icon("icon_status_closed")
- - else
- .profile-icon.fork-icon
- = custom_icon("icon_code_fork")
+- if current_path?('dashboard#activity')
+ .system-note-image.user-avatar
+ = author_avatar(event, size: 32)
+- else
+ - if event.target
+ - if event.action_name == "opened"
+ .system-note-image.open-icon
+ = custom_icon("icon_status_open")
+ - elsif event.action_name == "closed"
+ .system-note-image.closed-icon
+ = custom_icon("icon_status_closed")
+ - else
+ .system-note-image.fork-icon
+ = custom_icon("icon_code_fork")
.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 fee85c94277..259533bd400 100644
--- a/app/views/events/event/_created_project.html.haml
+++ b/app/views/events/event/_created_project.html.haml
@@ -1,5 +1,9 @@
-.profile-icon.open-icon
- = custom_icon("icon_status_open")
+- if current_path?('dashboard#activity')
+ .system-note-image.user-avatar
+ = author_avatar(event, size: 32)
+- else
+ .system-note-image.open-icon
+ = custom_icon("icon_status_open")
.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 83709f5e4d0..1785fe6ab16 100644
--- a/app/views/events/event/_note.html.haml
+++ b/app/views/events/event/_note.html.haml
@@ -1,5 +1,9 @@
-.profile-icon
- = custom_icon("icon_comment_o")
+- if current_path?('dashboard#activity')
+ .system-note-image.user-avatar
+ = author_avatar(event, size: 32)
+- else
+ .system-note-image
+ = custom_icon("icon_comment_o")
.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 efdc8764acf..8acee9c1da0 100644
--- a/app/views/events/event/_push.html.haml
+++ b/app/views/events/event/_push.html.haml
@@ -1,10 +1,14 @@
- project = event.project
-.profile-icon
- - if event.action_name == "deleted"
- = custom_icon("trash_o")
- - else
- = custom_icon("icon_commit")
+- if current_path?('dashboard#activity')
+ .system-note-image.user-avatar
+ = author_avatar(event, size: 32)
+- else
+ .system-note-image
+ - if event.action_name == "deleted"
+ = custom_icon("trash_o")
+ - else
+ = custom_icon("icon_commit")
.event-title
%span.author_name= link_to_author event