diff options
author | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-04-11 08:14:04 -0500 |
---|---|---|
committer | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-04-11 08:14:04 -0500 |
commit | d4c5dc49e0e8b419b507369ec33946392eb315be (patch) | |
tree | e6c68b741aa6d30d18a060d6697ab72760f9d95e | |
parent | c7011c88901c7fa8972f02444bd5e3feef698ca4 (diff) | |
download | gitlab-ce-d4c5dc49e0e8b419b507369ec33946392eb315be.tar.gz |
Only show icons on profile page; change to case statement
-rw-r--r-- | app/views/events/event/_common.html.haml | 14 | ||||
-rw-r--r-- | app/views/events/event/_created_project.html.haml | 9 | ||||
-rw-r--r-- | app/views/events/event/_note.html.haml | 8 | ||||
-rw-r--r-- | app/views/events/event/_push.html.haml | 8 |
4 files changed, 21 insertions, 18 deletions
diff --git a/app/views/events/event/_common.html.haml b/app/views/events/event/_common.html.haml index e6bb05e975e..7e18618ab49 100644 --- a/app/views/events/event/_common.html.haml +++ b/app/views/events/event/_common.html.haml @@ -1,17 +1,19 @@ -- if current_path?('dashboard#activity') - .system-note-image.user-avatar - = author_avatar(event, size: 32) -- else +- if current_path?('users#show') - if event.target - - if event.action_name == "opened" + - case event.action_name + - when 'opened' .system-note-image.open-icon = custom_icon("icon_status_open") - - elsif event.action_name == "closed" + - when 'closed' .system-note-image.closed-icon = custom_icon("icon_status_closed") - else .system-note-image.fork-icon = custom_icon("icon_code_fork") +- else + .system-note-image.user-avatar + = author_avatar(event, size: 32) + .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 259533bd400..653aa16ca00 100644 --- a/app/views/events/event/_created_project.html.haml +++ b/app/views/events/event/_created_project.html.haml @@ -1,9 +1,10 @@ -- if current_path?('dashboard#activity') - .system-note-image.user-avatar - = author_avatar(event, size: 32) -- else +- if current_path?('users#show') .system-note-image.open-icon = custom_icon("icon_status_open") +- else + .system-note-image.user-avatar + = author_avatar(event, size: 32) + .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 1785fe6ab16..8437ace22b5 100644 --- a/app/views/events/event/_note.html.haml +++ b/app/views/events/event/_note.html.haml @@ -1,9 +1,9 @@ -- if current_path?('dashboard#activity') - .system-note-image.user-avatar - = author_avatar(event, size: 32) -- else +- if current_path?('users#show') .system-note-image = custom_icon("icon_comment_o") +- else + .system-note-image.user-avatar + = author_avatar(event, size: 32) .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 8acee9c1da0..d67139777a1 100644 --- a/app/views/events/event/_push.html.haml +++ b/app/views/events/event/_push.html.haml @@ -1,14 +1,14 @@ - project = event.project -- if current_path?('dashboard#activity') - .system-note-image.user-avatar - = author_avatar(event, size: 32) -- else +- if current_path?('users#show') .system-note-image - if event.action_name == "deleted" = custom_icon("trash_o") - else = custom_icon("icon_commit") +- else + .system-note-image.user-avatar + = author_avatar(event, size: 32) .event-title %span.author_name= link_to_author event |