Commit c3efcf7a626ca2621b6fc9977aae8740ed7b10a8
1 parent
c3907bef
Exists in
master
and in
4 other branches
Pollished push event
Showing
2 changed files
with
23 additions
and
19 deletions
Show diff stats
app/assets/stylesheets/sections/events.scss
| ... | ... | @@ -50,7 +50,7 @@ |
| 50 | 50 | } |
| 51 | 51 | .event-body { |
| 52 | 52 | p { |
| 53 | - color:#666; | |
| 53 | + color:#555; | |
| 54 | 54 | } |
| 55 | 55 | .event-info { |
| 56 | 56 | color:#666; |
| ... | ... | @@ -73,7 +73,8 @@ |
| 73 | 73 | margin-left:50px; |
| 74 | 74 | margin-bottom:5px; |
| 75 | 75 | .avatar { |
| 76 | - width:22px; | |
| 76 | + width:18px; | |
| 77 | + margin-top:3px; | |
| 77 | 78 | } |
| 78 | 79 | } |
| 79 | 80 | |
| ... | ... | @@ -84,10 +85,17 @@ |
| 84 | 85 | .event_commits { |
| 85 | 86 | margin-top: 5px; |
| 86 | 87 | |
| 87 | - li.commit { | |
| 88 | - background: transparent; | |
| 89 | - padding:5px; | |
| 90 | - border:none; | |
| 88 | + li { | |
| 89 | + &.commit { | |
| 90 | + background: transparent; | |
| 91 | + padding:3px; | |
| 92 | + border:none; | |
| 93 | + font-size:12px; | |
| 94 | + } | |
| 95 | + &.commits-stat { | |
| 96 | + display: block; | |
| 97 | + margin-top: 5px; | |
| 98 | + } | |
| 91 | 99 | } |
| 92 | 100 | } |
| 93 | 101 | } | ... | ... |
app/views/events/_event_push.html.haml
| ... | ... | @@ -9,22 +9,18 @@ |
| 9 | 9 | %strong= event.ref_name |
| 10 | 10 | at |
| 11 | 11 | %strong= link_to event.project.name, event.project |
| 12 | - - if event.push_with_commits? | |
| 13 | - - if event.commits_count > 1 | |
| 14 | - = link_to compare_project_commits_path(event.project, from: event.parent_commit.id, to: event.last_commit.id) do | |
| 15 | - %strong #{event.parent_commit.id[0..7]}...#{event.last_commit.id[0..7]} | |
| 16 | 12 | |
| 17 | 13 | - if event.push_with_commits? |
| 18 | 14 | - project = event.project |
| 19 | 15 | .event-body |
| 20 | 16 | %ul.unstyled.event_commits |
| 21 | - - if event.commits_count > 3 | |
| 22 | - - event.commits[0...2].each do |commit| | |
| 23 | - = render "events/commit", commit: commit, project: project | |
| 24 | - %li | |
| 25 | - %br | |
| 26 | - \... and #{event.commits_count - 2} more commits | |
| 27 | - - else | |
| 28 | - - event.commits.each do |commit| | |
| 29 | - = render "events/commit", commit: commit, project: project | |
| 17 | + - few_commits = event.commits[0...2] | |
| 18 | + - few_commits.each do |commit| | |
| 19 | + = render "events/commit", commit: commit, project: project | |
| 20 | + | |
| 21 | + %li.commits-stat | |
| 22 | + - if event.commits_count > 2 | |
| 23 | + %span ... and #{event.commits_count - 2} more commits. | |
| 24 | + = link_to compare_project_commits_path(event.project, from: event.parent_commit.id, to: event.last_commit.id) do | |
| 25 | + %strong Compare → #{event.parent_commit.id[0..7]}...#{event.last_commit.id[0..7]} | |
| 30 | 26 | .clearfix | ... | ... |