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

Colored labels for events

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