Commit fe7bef3a537aa4c613cc2e4b40d6b94496427268

Authored by Dmitriy Zaporozhets
1 parent ba33ed41

squash commit summary in one sentence

app/assets/stylesheets/common.scss
@@ -142,23 +142,6 @@ input[type=text] { @@ -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 p.time { 145 p.time {
163 color: #999; 146 color: #999;
164 font-size: 90%; 147 font-size: 90%;
app/assets/stylesheets/gitlab_bootstrap/blocks.scss
@@ -62,7 +62,6 @@ @@ -62,7 +62,6 @@
62 62
63 .ui-box-body { 63 .ui-box-body {
64 border: none; 64 border: none;
65 - font-size: 12px;  
66 background-color: #f5f5f5; 65 background-color: #f5f5f5;
67 border: none; 66 border: none;
68 border-top: 1px solid #eee; 67 border-top: 1px solid #eee;
app/assets/stylesheets/sections/commits.scss
@@ -441,3 +441,26 @@ @@ -441,3 +441,26 @@
441 .ui-box.commit-box { 441 .ui-box.commit-box {
442 margin-top: 0; 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 = render "commit_box" 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 = render "projects/commits/diffs", diffs: @commit.diffs 2 = render "projects/commits/diffs", diffs: @commit.diffs
11 = render "projects/notes/notes_with_form" 3 = render "projects/notes/notes_with_form"
app/views/projects/commits/_diffs.html.haml
@@ -7,8 +7,15 @@ @@ -7,8 +7,15 @@
7 But if you still want to see diff 7 But if you still want to see diff
8 = link_to "click this link", project_commit_path(@project, @commit, force_show_diff: true), class: "underlined_link" 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 .file-stats 19 .file-stats
13 = render "projects/commits/diff_head", diffs: diffs 20 = render "projects/commits/diff_head", diffs: diffs
14 21