Commit 9511ec846d39ff57aca6ea2e82da47f04477078c

Authored by Dmitriy Zaporozhets
1 parent cc1ba255

improved diff, restyled login page

app/assets/stylesheets/commits.css.scss
... ... @@ -75,11 +75,15 @@
75 75 padding:0px;
76 76 border:none;
77 77 &.new {
78   - background: #DFD;
  78 + background: #CFD;
79 79 }
80 80 &.old {
81 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
1 1 /* Login Page */
2   -body.login-page{ padding-top: 10%}
  2 +body.login-page{
  3 + padding-top: 10%;
  4 + background:$style_color;
  5 +}
3 6  
4 7 .login-box{
5 8 width: 304px;
... ...
app/helpers/commits_helper.rb
... ... @@ -65,7 +65,7 @@ module CommitsHelper
65 65 line_old = line.match(/\-[0-9]*/)[0].to_i.abs rescue 0
66 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 69 next
70 70 else
71 71 type = diff_line_class(line)
... ...
app/views/commits/_text_file.html.haml
... ... @@ -4,7 +4,7 @@
4 4 - if type == "match"
5 5 %td.old_line= "..."
6 6 %td.new_line= "..."
7   - %td.line_content  
  7 + %td.line_content.matched= line
8 8 - else
9 9 %td.old_line= link_to raw(type == "new" ? " " : line_old), "##{line_code}", :id => line_code
10 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 13 .clear
14 14 %br
15 15  
  16 +%p.cgray
  17 + Showing #{pluralize(@commit.diffs.count, "changed file")}
16 18 = render "commits/diffs", :diffs => @commit.diffs
17 19 = render "notes/notes"
18 20 = render "notes/per_line_form"
... ...