Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
6667f3db
Commit
6667f3db
authored
Sep 24, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Colored labels for events
parent
d23022c6
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
35 deletions
+38
-35
app/assets/stylesheets/sections/events.scss
app/assets/stylesheets/sections/events.scss
+29
-24
app/models/event.rb
app/models/event.rb
+1
-0
app/views/events/_event_issue.html.haml
app/views/events/_event_issue.html.haml
+1
-2
app/views/events/_event_membership_changed.html.haml
app/views/events/_event_membership_changed.html.haml
+1
-2
app/views/events/_event_merge_request.html.haml
app/views/events/_event_merge_request.html.haml
+5
-5
app/views/events/_event_push.html.haml
app/views/events/_event_push.html.haml
+1
-2
No files found.
app/assets/stylesheets/sections/events.scss
View file @
6667f3db
...
...
@@ -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
;
...
...
app/models/event.rb
View file @
6667f3db
...
...
@@ -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
...
...
app/views/events/_event_issue.html.haml
View file @
6667f3db
=
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
...
...
app/views/events/_event_membership_changed.html.haml
View file @
6667f3db
=
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
)
...
...
app/views/events/_event_merge_request.html.haml
View file @
6667f3db
...
...
@@ -3,13 +3,13 @@
=
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
.event-info
%span
=
event
.
merge_request
.
source_branch
→
%span
=
event
.
merge_request
.
target_branch
...
...
app/views/events/_event_push.html.haml
View file @
6667f3db
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment