summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgitlabhq <m@gitlabhq.com>2011-11-21 02:16:10 -0500
committergitlabhq <m@gitlabhq.com>2011-11-21 02:16:10 -0500
commit46bebac9830cebe870dfdb9eadf5ed45cd0f2125 (patch)
tree112041b2e4e4c2f1d03a6e32f3d709025985138e
parent3f35cccfbd9a97bd1291c3b2dd7bdf78e8acc047 (diff)
downloadgitlab-ce-46bebac9830cebe870dfdb9eadf5ed45cd0f2125.tar.gz
commit restyle
-rw-r--r--app/assets/stylesheets/projects.css.scss10
-rw-r--r--app/views/commits/_diff.html.haml3
-rw-r--r--app/views/commits/_diff_head.html.haml51
-rw-r--r--app/views/commits/show.html.haml18
4 files changed, 43 insertions, 39 deletions
diff --git a/app/assets/stylesheets/projects.css.scss b/app/assets/stylesheets/projects.css.scss
index 4c20273e323..906715a183e 100644
--- a/app/assets/stylesheets/projects.css.scss
+++ b/app/assets/stylesheets/projects.css.scss
@@ -28,17 +28,7 @@
/** File stat **/
.file_stats {
- margin-bottom:10px;
- @include round-borders-all(4px);
-
span {
- border-top: 1px solid #eaeaea;
- padding:5px 5px;
- display:block;
- &:first-child {
- border-top:none;
- }
-
img {
width:18px;
float:left;
diff --git a/app/views/commits/_diff.html.haml b/app/views/commits/_diff.html.haml
index 4bf0e06a4ef..fd929f30b39 100644
--- a/app/views/commits/_diff.html.haml
+++ b/app/views/commits/_diff.html.haml
@@ -1,4 +1,5 @@
-.file_stats= render "commits/diff_head"
+.file_stats
+ = render "commits/diff_head"
- @commit.diffs.each do |diff|
- next if diff.diff.empty?
diff --git a/app/views/commits/_diff_head.html.haml b/app/views/commits/_diff_head.html.haml
index 922c35990af..26105261dc9 100644
--- a/app/views/commits/_diff_head.html.haml
+++ b/app/views/commits/_diff_head.html.haml
@@ -1,24 +1,29 @@
-- @commit.diffs.each do |diff|
- - if diff.deleted_file
- %span.removed_file
- %a{:href => "##{diff.a_path}"}
- = diff.a_path
- = image_tag "blueprint_delete.png"
- - elsif diff.renamed_file
- %span.moved_file
- %a{:href => "##{diff.b_path}"}
- = diff.a_path
- = "->"
- = diff.b_path
- = image_tag "blueprint_notice.png"
- - elsif diff.new_file
- %span.new_file
- %a{:href => "##{diff.b_path}"}
- = diff.b_path
- = image_tag "blueprint_add.png"
- - else
- %span.edit_file
- %a{:href => "##{diff.b_path}"}
- = diff.b_path
- = image_tag "blueprint_info.png"
+%table
+ %thead
+ %th Files
+ - @commit.diffs.each do |diff|
+ %tr
+ %td
+ - if diff.deleted_file
+ %span.removed_file
+ %a{:href => "##{diff.a_path}"}
+ = diff.a_path
+ = image_tag "blueprint_delete.png"
+ - elsif diff.renamed_file
+ %span.moved_file
+ %a{:href => "##{diff.b_path}"}
+ = diff.a_path
+ = "->"
+ = diff.b_path
+ = image_tag "blueprint_notice.png"
+ - elsif diff.new_file
+ %span.new_file
+ %a{:href => "##{diff.b_path}"}
+ = diff.b_path
+ = image_tag "blueprint_add.png"
+ - else
+ %span.edit_file
+ %a{:href => "##{diff.b_path}"}
+ = diff.b_path
+ = image_tag "blueprint_info.png"
diff --git a/app/views/commits/show.html.haml b/app/views/commits/show.html.haml
index 93a828383ba..6fb4b5e3f4f 100644
--- a/app/views/commits/show.html.haml
+++ b/app/views/commits/show.html.haml
@@ -1,7 +1,18 @@
-%h3
- = "[ #{@commit.author_name} ] #{truncate(@commit.safe_message, :length => 70)}"
+- content_for(:body_class, "project-page commits-page")
+
+-#%a.right.button{:href => "#"} Download
+-#-if can? current_user, :admin_project, @project
+ %a.right.button.blue{:href => "#"} EDIT
+%h2.icon
+ %span
+ %d
+ = "#{truncate(@commit.safe_message, :length => 50)}"
+.right
+ = link_to 'Browse Code', tree_project_ref_path(@project, @commit.id), :class => "button"
-#= link_to 'Back', project_commits_path(@project), :class => "button"
%table.round-borders
+ %thead
+ %th{:colspan => 2} Details
%tr
%td ID
%td= @commit.id
@@ -16,9 +27,6 @@
%td
%pre.commit_message
= preserve @commit.safe_message
- %tr
- %td Tree
- %td= link_to 'Browse Code', tree_project_ref_path(@project, @commit.id)
.clear
%br