Commit 6667f3db authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Colored labels for events

parent d23022c6
...@@ -3,33 +3,35 @@ ...@@ -3,33 +3,35 @@
* *
*/ */
.event_label { .event_label {
/*@extend .label;*/ &.pushed {
/*background-color: #999;*/ padding:0 2px;
@extend .alert;
/*&.pushed {*/ @extend .alert-info;
/*background-color: #4A97BD;*/ }
/*}*/
/*&.opened {*/
/*background-color: #469847;*/
/*}*/
/*&.closed {*/ &.opened {
/*background-color: #B94A48;*/ padding:0 2px;
/*}*/ @extend .alert;
@extend .alert-success;
}
/*&.merged {*/ &.closed {
/*background-color: #2A2;*/ padding:0 2px;
/*}*/ @extend .alert;
@extend .alert-error;
}
/*&.joined {*/ &.merged {
/*background-color: #1ca9dd;*/ padding:0 2px;
/*}*/ @extend .alert;
@extend .alert-success;
}
/*&.left {*/ &.left,
/*background-color: #888;*/ &.joined {
/*float:none;*/ padding:0 2px;
/*}*/ @extend .alert;
}
} }
/** /**
...@@ -43,13 +45,16 @@ ...@@ -43,13 +45,16 @@
color:#333; color:#333;
font-weight: bold; font-weight: bold;
.author_name { .author_name {
color:#777; color:#333;
} }
} }
.event-body { .event-body {
p { p {
color:#666; color:#666;
} }
.event-info {
color:#666;
}
} }
.avatar { .avatar {
width:32px; width:32px;
......
...@@ -132,6 +132,7 @@ class Event < ActiveRecord::Base ...@@ -132,6 +132,7 @@ class Event < ActiveRecord::Base
end end
end end
delegate :name, :email, to: :author, prefix: true, allow_nil: true delegate :name, :email, to: :author, prefix: true, allow_nil: true
delegate :title, to: :issue, prefix: true, allow_nil: true delegate :title, to: :issue, prefix: true, allow_nil: true
delegate :title, to: :merge_request, prefix: true, allow_nil: true delegate :title, to: :merge_request, prefix: true, allow_nil: true
......
= image_tag gravatar_icon(event.author_email), class: "avatar" = image_tag gravatar_icon(event.author_email), class: "avatar"
.event-title .event-title
%strong.author_name #{event.author_name} %strong.author_name #{event.author_name}
%span.event_label{class: event.action_name}= event.action_name %span.event_label{class: event.action_name} #{event.action_name} issue
issue
= link_to project_issue_path(event.project, event.issue) do = link_to project_issue_path(event.project, event.issue) do
%strong= truncate event.issue_title %strong= truncate event.issue_title
at at
......
= image_tag gravatar_icon(event.author_email), class: "avatar" = image_tag gravatar_icon(event.author_email), class: "avatar"
.event-title .event-title
%strong.author_name #{event.author_name} %strong.author_name #{event.author_name}
%span.event_label{class: event.action_name}= event.action_name %span.event_label{class: event.action_name} #{event.action_name} project
project
%strong= link_to event.project_name, event.project %strong= link_to event.project_name, event.project
%span.cgray %span.cgray
= time_ago_in_words(event.created_at) = time_ago_in_words(event.created_at)
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
= image_tag gravatar_icon(event.author_email), class: "avatar" = image_tag gravatar_icon(event.author_email), class: "avatar"
.event-title .event-title
%strong.author_name #{event.author_name} %strong.author_name #{event.author_name}
%span.event_label{class: event.action_name}= event.action_name %span.event_label{class: event.action_name} #{event.action_name} merge request
merge request
= link_to project_merge_request_path(event.project, event.merge_request) do = link_to project_merge_request_path(event.project, event.merge_request) do
%strong= truncate event.merge_request_title %strong= truncate event.merge_request_title
at at
%strong= link_to event.project.name, event.project %strong= link_to event.project.name, event.project
.event-body .event-body
.event-info
%span= event.merge_request.source_branch %span= event.merge_request.source_branch
&rarr; &rarr;
%span= event.merge_request.target_branch %span= event.merge_request.target_branch
......
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
.event-title .event-title
%strong.author_name #{event.author_name} %strong.author_name #{event.author_name}
%span.event_label.pushed= event.push_action_name %span.event_label.pushed #{event.push_action_name} #{event.ref_type}
= event.ref_type
= link_to project_commits_path(event.project, ref: event.ref_name) do = link_to project_commits_path(event.project, ref: event.ref_name) do
%strong= event.ref_name %strong= event.ref_name
at at
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment