Commit 46bebac9830cebe870dfdb9eadf5ed45cd0f2125

Authored by gitlabhq
1 parent 3f35cccf

commit restyle

app/assets/stylesheets/projects.css.scss
... ... @@ -28,17 +28,7 @@
28 28  
29 29 /** File stat **/
30 30 .file_stats {
31   - margin-bottom:10px;
32   - @include round-borders-all(4px);
33   -
34 31 span {
35   - border-top: 1px solid #eaeaea;
36   - padding:5px 5px;
37   - display:block;
38   - &:first-child {
39   - border-top:none;
40   - }
41   -
42 32 img {
43 33 width:18px;
44 34 float:left;
... ...
app/views/commits/_diff.html.haml
1   -.file_stats= render "commits/diff_head"
  1 +.file_stats
  2 + = render "commits/diff_head"
2 3  
3 4 - @commit.diffs.each do |diff|
4 5 - next if diff.diff.empty?
... ...
app/views/commits/_diff_head.html.haml
1   -- @commit.diffs.each do |diff|
2   - - if diff.deleted_file
3   - %span.removed_file
4   - %a{:href => "##{diff.a_path}"}
5   - = diff.a_path
6   - = image_tag "blueprint_delete.png"
7   - - elsif diff.renamed_file
8   - %span.moved_file
9   - %a{:href => "##{diff.b_path}"}
10   - = diff.a_path
11   - = "->"
12   - = diff.b_path
13   - = image_tag "blueprint_notice.png"
14   - - elsif diff.new_file
15   - %span.new_file
16   - %a{:href => "##{diff.b_path}"}
17   - = diff.b_path
18   - = image_tag "blueprint_add.png"
19   - - else
20   - %span.edit_file
21   - %a{:href => "##{diff.b_path}"}
22   - = diff.b_path
23   - = image_tag "blueprint_info.png"
  1 +%table
  2 + %thead
  3 + %th Files
  4 + - @commit.diffs.each do |diff|
  5 + %tr
  6 + %td
  7 + - if diff.deleted_file
  8 + %span.removed_file
  9 + %a{:href => "##{diff.a_path}"}
  10 + = diff.a_path
  11 + = image_tag "blueprint_delete.png"
  12 + - elsif diff.renamed_file
  13 + %span.moved_file
  14 + %a{:href => "##{diff.b_path}"}
  15 + = diff.a_path
  16 + = "->"
  17 + = diff.b_path
  18 + = image_tag "blueprint_notice.png"
  19 + - elsif diff.new_file
  20 + %span.new_file
  21 + %a{:href => "##{diff.b_path}"}
  22 + = diff.b_path
  23 + = image_tag "blueprint_add.png"
  24 + - else
  25 + %span.edit_file
  26 + %a{:href => "##{diff.b_path}"}
  27 + = diff.b_path
  28 + = image_tag "blueprint_info.png"
24 29  
... ...
app/views/commits/show.html.haml
1   -%h3
2   - = "[ #{@commit.author_name} ] #{truncate(@commit.safe_message, :length => 70)}"
  1 +- content_for(:body_class, "project-page commits-page")
  2 +
  3 +-#%a.right.button{:href => "#"} Download
  4 +-#-if can? current_user, :admin_project, @project
  5 + %a.right.button.blue{:href => "#"} EDIT
  6 +%h2.icon
  7 + %span
  8 + %d
  9 + = "#{truncate(@commit.safe_message, :length => 50)}"
  10 +.right
  11 + = link_to 'Browse Code', tree_project_ref_path(@project, @commit.id), :class => "button"
3 12 -#= link_to 'Back', project_commits_path(@project), :class => "button"
4 13 %table.round-borders
  14 + %thead
  15 + %th{:colspan => 2} Details
5 16 %tr
6 17 %td ID
7 18 %td= @commit.id
... ... @@ -16,9 +27,6 @@
16 27 %td
17 28 %pre.commit_message
18 29 = preserve @commit.safe_message
19   - %tr
20   - %td Tree
21   - %td= link_to 'Browse Code', tree_project_ref_path(@project, @commit.id)
22 30 .clear
23 31  
24 32 %br
... ...