Skip to content

Commit b57faf9

Browse files
committed
Push events polished
1 parent cadf12c commit b57faf9

File tree

5 files changed

+21
-9
lines changed

5 files changed

+21
-9
lines changed

app/assets/stylesheets/common.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ p.time {
871871

872872
.event_feed {
873873
min-height:40px;
874-
border-bottom:1px solid #eee;
874+
border-bottom:1px solid #ddd;
875875
.avatar {
876876
width:32px;
877877
}
@@ -884,8 +884,6 @@ p.time {
884884
}
885885

886886
padding: 15px 5px;
887-
border-bottom: 1px solid #eee;
888-
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
889887
&:last-child { border:none }
890888
.wll:hover { background:none }
891889
}

app/views/events/_commit.html.haml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
%li.wll.commit
2+
= link_to project_commit_path(project, :id => commit.id) do
3+
%p
4+
%code.left= commit.id.to_s[0..10]
5+
%strong.cgray= commit.author_name
6+
–
7+
= image_tag gravatar_icon(commit.author_email), :class => "avatar", :width => 16
8+
%span.row_title= truncate(commit.safe_message, :length => 50) rescue "--broken encoding"
9+

app/views/events/_event_changed_merge_request.html.haml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ at
1313
%span.cgray
1414
= time_ago_in_words(event.created_at)
1515
ago.
16+
%br
1617
%span.label= event.merge_request.source_branch
1718
→
1819
%span.label= event.merge_request.target_branch

app/views/events/_event_new_merge_request.html.haml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ at
99
%span.cgray
1010
= time_ago_in_words(event.created_at)
1111
ago.
12+
%br
1213
%span.label= event.merge_request.source_branch
1314
→
1415
%span.label= event.merge_request.target_branch

app/views/events/_event_push.html.haml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,16 @@
3030
ago.
3131
- if event.commits.count > 1
3232
= link_to compare_project_commits_path(event.project, :from => event.commits.first.prev_commit_id, :to => event.commits.last.id) do
33-
Compare #{event.commits.first.commit.id[0..8]}...#{event.commits.last.id[0..8]}
34-
- @project = event.project
33+
%strong #{event.commits.first.commit.id[0..7]}...#{event.commits.last.id[0..7]}
34+
- project = event.project
3535
%ul.unstyled.event_commits
3636
- if event.commits.size > 3
37-
= render event.commits[0...2]
38-
%li ... and #{event.commits.size - 2} more commits
37+
- event.commits[0...2].each do |commit|
38+
= render "events/commit", :commit => commit, :project => project
39+
%li
40+
%br
41+
\... and #{event.commits.size - 2} more commits
3942
- else
40-
= render event.commits
41-
43+
- event.commits.each do |commit|
44+
= render "events/commit", :commit => commit, :project => project
4245

0 commit comments

Comments
 (0)