Commit fe7bef3a537aa4c613cc2e4b40d6b94496427268
1 parent
ba33ed41
Exists in
master
and in
4 other branches
squash commit summary in one sentence
Showing
5 changed files
with
32 additions
and
28 deletions
Show diff stats
app/assets/stylesheets/common.scss
| ... | ... | @@ -142,23 +142,6 @@ input[type=text] { |
| 142 | 142 | } |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | -li.commit { | |
| 146 | - .avatar { | |
| 147 | - width: 24px; | |
| 148 | - top:-5px; | |
| 149 | - margin-right: 10px; | |
| 150 | - margin-left: 10px; | |
| 151 | - } | |
| 152 | - | |
| 153 | - code { | |
| 154 | - padding: 2px 2px 0; | |
| 155 | - margin-top: -2px; | |
| 156 | - &:hover { | |
| 157 | - color: black; | |
| 158 | - border: 1px solid #ccc; | |
| 159 | - } | |
| 160 | - } | |
| 161 | -} | |
| 162 | 145 | p.time { |
| 163 | 146 | color: #999; |
| 164 | 147 | font-size: 90%; | ... | ... |
app/assets/stylesheets/gitlab_bootstrap/blocks.scss
app/assets/stylesheets/sections/commits.scss
| ... | ... | @@ -441,3 +441,26 @@ |
| 441 | 441 | .ui-box.commit-box { |
| 442 | 442 | margin-top: 0; |
| 443 | 443 | } |
| 444 | + | |
| 445 | +.commit-stat-summary { | |
| 446 | + color: #666; | |
| 447 | + line-height: 2; | |
| 448 | +} | |
| 449 | + | |
| 450 | +li.commit { | |
| 451 | + .avatar { | |
| 452 | + width: 24px; | |
| 453 | + top:-5px; | |
| 454 | + margin-right: 5px; | |
| 455 | + margin-left: 10px; | |
| 456 | + } | |
| 457 | + | |
| 458 | + code { | |
| 459 | + padding: 2px 2px 0; | |
| 460 | + margin-top: -2px; | |
| 461 | + &:hover { | |
| 462 | + color: black; | |
| 463 | + border: 1px solid #ccc; | |
| 464 | + } | |
| 465 | + } | |
| 466 | +} | ... | ... |
app/views/projects/commit/show.html.haml
| 1 | 1 | = render "commit_box" |
| 2 | - | |
| 3 | -- unless @commit.has_zero_stats? | |
| 4 | - %p.pull-right.cgray | |
| 5 | - This commit has | |
| 6 | - %span.cgreen #{@commit.stats.additions} additions | |
| 7 | - and | |
| 8 | - %span.cred #{@commit.stats.deletions} deletions | |
| 9 | - | |
| 10 | 2 | = render "projects/commits/diffs", diffs: @commit.diffs |
| 11 | 3 | = render "projects/notes/notes_with_form" | ... | ... |
app/views/projects/commits/_diffs.html.haml
| ... | ... | @@ -7,8 +7,15 @@ |
| 7 | 7 | But if you still want to see diff |
| 8 | 8 | = link_to "click this link", project_commit_path(@project, @commit, force_show_diff: true), class: "underlined_link" |
| 9 | 9 | |
| 10 | -%p.cgray | |
| 11 | - Showing #{pluralize(diffs.count, "changed file")} | |
| 10 | +%p.commit-stat-summary | |
| 11 | + Showing | |
| 12 | + %strong.cdark #{pluralize(diffs.count, "changed file")} | |
| 13 | + - if current_controller?(:commit) | |
| 14 | + - unless @commit.has_zero_stats? | |
| 15 | + with | |
| 16 | + %strong.cgreen #{@commit.stats.additions} additions | |
| 17 | + and | |
| 18 | + %strong.cred #{@commit.stats.deletions} deletions | |
| 12 | 19 | .file-stats |
| 13 | 20 | = render "projects/commits/diff_head", diffs: diffs |
| 14 | 21 | ... | ... |