gitlabhq/app/views/merge_requests/_diffs.html.haml

27 lines
873 B
Plaintext
Raw Normal View History

.file_stats
= render "commits/diff_head", :diffs => @diffs
2011-12-01 00:51:16 +01:00
- @diffs.each_with_index do |diff, i|
2011-11-28 21:16:57 +01:00
- 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?
2011-12-01 00:51:16 +01:00
= render :partial => "commits/text_file", :locals => { :diff => diff, :index => i }
2011-11-28 21:16:57 +01:00
- 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
- if @diffs.empty?
%p.cgray Nothing to merge