Commit 494cd02b38eb2bfbeeb69dec0688a7a1e7ccf50f
1 parent
a3bb9ca1
Exists in
master
and in
4 other branches
Colored labels for events on dashboard
Showing
4 changed files
with
19 additions
and
8 deletions
Show diff stats
app/assets/stylesheets/gitlab_bootstrap.scss
@@ -303,9 +303,20 @@ table.no-borders { | @@ -303,9 +303,20 @@ table.no-borders { | ||
303 | } | 303 | } |
304 | 304 | ||
305 | .event_label { | 305 | .event_label { |
306 | - background: #FCEEC1; | ||
307 | - padding: 2px 2px 0; | ||
308 | - font-family: monospace; | 306 | + @extend .label; |
307 | + background-color: #999; | ||
308 | + | ||
309 | + &.pushed { | ||
310 | + background-color: #3A87AD; | ||
311 | + } | ||
312 | + | ||
313 | + &.opened { | ||
314 | + background-color: #468847; | ||
315 | + } | ||
316 | + | ||
317 | + &.closed { | ||
318 | + background-color: #B94A48; | ||
319 | + } | ||
309 | } | 320 | } |
310 | 321 | ||
311 | img.avatar { | 322 | img.avatar { |
app/views/events/_event_issue.html.haml
1 | = image_tag gravatar_icon(event.author_email), :class => "avatar" | 1 | = image_tag gravatar_icon(event.author_email), :class => "avatar" |
2 | %strong #{event.author_name} | 2 | %strong #{event.author_name} |
3 | -%span.event_label= event.action_name | ||
4 | - issue | 3 | +%span.event_label{:class => event.action_name}= event.action_name |
4 | +issue | ||
5 | = link_to project_issue_path(event.project, event.issue) do | 5 | = link_to project_issue_path(event.project, event.issue) do |
6 | %strong= truncate event.issue_title | 6 | %strong= truncate event.issue_title |
7 | at | 7 | at |
app/views/events/_event_merge_request.html.haml
@@ -2,8 +2,8 @@ | @@ -2,8 +2,8 @@ | ||
2 | .event_icon= image_tag "event_mr_merged.png" | 2 | .event_icon= image_tag "event_mr_merged.png" |
3 | = image_tag gravatar_icon(event.author_email), :class => "avatar" | 3 | = image_tag gravatar_icon(event.author_email), :class => "avatar" |
4 | %strong #{event.author_name} | 4 | %strong #{event.author_name} |
5 | -%span.event_label= event.action_name | ||
6 | - merge request | 5 | +%span.event_label{:class => event.action_name}= event.action_name |
6 | +merge request | ||
7 | = link_to project_merge_request_path(event.project, event.merge_request) do | 7 | = link_to project_merge_request_path(event.project, event.merge_request) do |
8 | %strong= truncate event.merge_request_title | 8 | %strong= truncate event.merge_request_title |
9 | at | 9 | at |
app/views/events/_event_push.html.haml
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | .event_icon= image_tag "event_push.png" | 2 | .event_icon= image_tag "event_push.png" |
3 | = image_tag gravatar_icon(event.author_email), :class => "avatar" | 3 | = image_tag gravatar_icon(event.author_email), :class => "avatar" |
4 | %strong #{event.author_name} | 4 | %strong #{event.author_name} |
5 | - %span.event_label= event.push_action_name | 5 | + %span.event_label.pushed= event.push_action_name |
6 | = event.ref_type | 6 | = event.ref_type |
7 | = link_to project_commits_path(event.project, :ref => event.ref_name) do | 7 | = link_to project_commits_path(event.project, :ref => event.ref_name) do |
8 | %strong= event.ref_name | 8 | %strong= event.ref_name |