diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-02-06 22:32:04 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-02-06 22:32:04 +0200 |
commit | 422e43989b0e35f3773c7e91f3d04c0baec0fb14 (patch) | |
tree | 3f14f89d40022a2b62830c873dba18c2a7f3e894 /app/views/merge_requests | |
parent | 6c416aaac85fe16cd4900a686714627e9a0fcdbc (diff) | |
download | gitlab-ce-422e43989b0e35f3773c7e91f3d04c0baec0fb14.tar.gz |
Compare view for commits
Diffstat (limited to 'app/views/merge_requests')
-rw-r--r-- | app/views/merge_requests/_commits.html.haml | 11 | ||||
-rw-r--r-- | app/views/merge_requests/_diffs.html.haml | 25 |
2 files changed, 2 insertions, 34 deletions
diff --git a/app/views/merge_requests/_commits.html.haml b/app/views/merge_requests/_commits.html.haml index ddc0ce19189..baeca7a3aa4 100644 --- a/app/views/merge_requests/_commits.html.haml +++ b/app/views/merge_requests/_commits.html.haml @@ -1,15 +1,6 @@ - if @commits.size > 0 .merge-request-commits - - @commits.each do |commit| - .entry - = link_to project_commit_path(@project, :id => commit.id) do - %strong - = truncate(commit.id.to_s, :length => 10) - = image_tag gravatar_icon(commit.author_email), :class => "", :width => 16 - %span= truncate(commit.safe_message, :length => 40) - %span.right - = time_ago_in_words(commit.committed_date) - ago + %ul.unstyled= render @commits - if @commits.empty? %p.cgray Nothing to merge diff --git a/app/views/merge_requests/_diffs.html.haml b/app/views/merge_requests/_diffs.html.haml index 9534da700d3..bd904a77094 100644 --- a/app/views/merge_requests/_diffs.html.haml +++ b/app/views/merge_requests/_diffs.html.haml @@ -1,26 +1,3 @@ -.file_stats - = render "commits/diff_head", :diffs => @diffs -- @diffs.each_with_index do |diff, i| - - next if diff.diff.empty? - - file = (@commit.tree / diff.b_path) - - next unless file - .diff_file - .diff_file_header - - if diff.deleted_file - %strong{:id => "#{diff.b_path}"}= diff.a_path - - else - = link_to tree_file_project_ref_path(@project, @commit.id, diff.b_path) do - %strong{:id => "#{diff.b_path}"}= diff.b_path - %br/ - .diff_file_content - - if file.text? - = render :partial => "commits/text_file", :locals => { :diff => diff, :index => i } - - elsif file.image? - .diff_file_content_image - %img{:src => "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"} - - else - %p - %center No preview for this file type - += render "commits/diffs", :diffs => @diffs - if @diffs.empty? %p.cgray Nothing to merge |