Commit 9511ec846d39ff57aca6ea2e82da47f04477078c
1 parent
cc1ba255
Exists in
master
and in
4 other branches
improved diff, restyled login page
Showing
5 changed files
with
13 additions
and
4 deletions
Show diff stats
app/assets/stylesheets/commits.css.scss
@@ -75,11 +75,15 @@ | @@ -75,11 +75,15 @@ | ||
75 | padding:0px; | 75 | padding:0px; |
76 | border:none; | 76 | border:none; |
77 | &.new { | 77 | &.new { |
78 | - background: #DFD; | 78 | + background: #CFD; |
79 | } | 79 | } |
80 | &.old { | 80 | &.old { |
81 | background: #FDD; | 81 | background: #FDD; |
82 | } | 82 | } |
83 | + &.matched { | ||
84 | + color:#ccc; | ||
85 | + background:#fafafa; | ||
86 | + } | ||
83 | } | 87 | } |
84 | } | 88 | } |
85 | 89 |
app/assets/stylesheets/login.scss
app/helpers/commits_helper.rb
@@ -65,7 +65,7 @@ module CommitsHelper | @@ -65,7 +65,7 @@ module CommitsHelper | ||
65 | line_old = line.match(/\-[0-9]*/)[0].to_i.abs rescue 0 | 65 | line_old = line.match(/\-[0-9]*/)[0].to_i.abs rescue 0 |
66 | line_new = line.match(/\+[0-9]*/)[0].to_i.abs rescue 0 | 66 | line_new = line.match(/\+[0-9]*/)[0].to_i.abs rescue 0 |
67 | 67 | ||
68 | - yield(nil, type, nil, nil, nil) | 68 | + yield(line, type, nil, nil, nil) |
69 | next | 69 | next |
70 | else | 70 | else |
71 | type = diff_line_class(line) | 71 | type = diff_line_class(line) |
app/views/commits/_text_file.html.haml
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | - if type == "match" | 4 | - if type == "match" |
5 | %td.old_line= "..." | 5 | %td.old_line= "..." |
6 | %td.new_line= "..." | 6 | %td.new_line= "..." |
7 | - %td.line_content | 7 | + %td.line_content.matched= line |
8 | - else | 8 | - else |
9 | %td.old_line= link_to raw(type == "new" ? " " : line_old), "##{line_code}", :id => line_code | 9 | %td.old_line= link_to raw(type == "new" ? " " : line_old), "##{line_code}", :id => line_code |
10 | %td.new_line= link_to raw(type == "old" ? " " : line_new) , "##{line_code}", :id => line_code | 10 | %td.new_line= link_to raw(type == "old" ? " " : line_new) , "##{line_code}", :id => line_code |
app/views/commits/show.html.haml
@@ -13,6 +13,8 @@ | @@ -13,6 +13,8 @@ | ||
13 | .clear | 13 | .clear |
14 | %br | 14 | %br |
15 | 15 | ||
16 | +%p.cgray | ||
17 | + Showing #{pluralize(@commit.diffs.count, "changed file")} | ||
16 | = render "commits/diffs", :diffs => @commit.diffs | 18 | = render "commits/diffs", :diffs => @commit.diffs |
17 | = render "notes/notes" | 19 | = render "notes/notes" |
18 | = render "notes/per_line_form" | 20 | = render "notes/per_line_form" |