Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2011-12-01 03:51:16 +0400
committerDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2011-12-01 03:51:16 +0400
commitc2cfc52e449a7bcd817909ace4ab8926509ee4f2 (patch)
tree5d74711deec5bdeab9038ebd3334ee7f46ee951a /app
parent570f63daaff7ef2b7b05c83714c78755b5d07101 (diff)
fix merge request diff
Diffstat (limited to 'app')
-rw-r--r--app/views/merge_requests/_diffs.html.haml4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/merge_requests/_diffs.html.haml b/app/views/merge_requests/_diffs.html.haml
index eb44de68c71..2ea6c79d25e 100644
--- a/app/views/merge_requests/_diffs.html.haml
+++ b/app/views/merge_requests/_diffs.html.haml
@@ -1,4 +1,4 @@
-- @diffs.each do |diff|
+- @diffs.each_with_index do |diff, i|
- next if diff.diff.empty?
- file = (@commit.tree / diff.b_path)
- next unless file
@@ -12,7 +12,7 @@
%br/
.diff_file_content
- if file.text?
- = render :partial => "commits/text_file", :locals => { :diff => diff }
+ = 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)}"}