Skip to content
Snippets Groups Projects
Verified Commit c741fcab authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Fix all broken stuff after diff refactoring

parent 531f16be
No related branches found
No related tags found
No related merge requests found
.row
.col-md-8
= render 'projects/commits/diff_stats', diffs: diffs
.col-md-4
%ul.nav.nav-tabs
%li.pull-right{class: params[:view] == 'parallel' ? 'active' : ''}
- params_copy = params.dup
- params_copy[:view] = 'parallel'
= link_to "Side-by-side Diff", url_for(params_copy), {id: "commit-diff-viewtype"}
%li.pull-right{class: params[:view] != 'parallel' ? 'active' : ''}
- params_copy[:view] = 'inline'
= link_to "Inline Diff", url_for(params_copy), {id: "commit-diff-viewtype"}
- if show_diff_size_warninig?(diffs)
= render 'projects/diffs/diff_warning', diffs: diffs
.files
- safe_diff_files(diffs).each_with_index do |diff, i|
= render 'projects/diffs/diff_file', diff: diff_file, i: i, project: project
- if @diff_timeout
.alert.alert-danger
%h4
Failed to collect changes
%p
Maybe diff is really big and operation failed with timeout. Try to get diff localy
Loading
Loading
@@ -18,7 +18,7 @@
- else
%ul.well-list= render Commit.decorate(@commits), project: @project
 
= render "projects/commits/diffs", diffs: @diffs, project: @project
= render "projects/diffs/diffs", diffs: @diffs, project: @project
 
- else
.light-well
Loading
Loading
Loading
Loading
@@ -41,7 +41,7 @@
= render "projects/diffs/text_file", diff_file: diff_file, index: i
- elsif blob.image?
- old_file = project.repository.prev_blob_for_diff(@commit, diff_file)
= render "projects/diffs/image", diff_file: diff_file, old_file: old_file, blob: blob, index: i
= render "projects/diffs/image", diff_file: diff_file, old_file: old_file, file: blob, index: i
- else
.nothing-here-block No preview for this file type
 
Loading
Loading
@@ -14,6 +14,6 @@
= link_to "Email patch", project_merge_request_path(@project, @merge_request, format: :patch), class: "btn btn-warning btn-small"
%p
To preserve performance only
%strong #{safe_diff_files(diffs).size} of #{diffs.size}
%strong #{safe_diff_files(@project, diffs).size} of #{diffs.size}
files displayed.
 
- diff = diff_file.diff
- if diff.renamed_file || diff.new_file || diff.deleted_file
.image
%span.wrap
Loading
Loading
Loading
Loading
@@ -75,7 +75,7 @@
 
%h4 Changes
- if @diffs.present?
= render "projects/commits/diffs", diffs: @diffs, project: @project
= render "projects/diffs/diffs", diffs: @diffs, project: @project
- elsif @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE
.bs-callout.bs-callout-danger
%h4 This comparison includes more than #{MergeRequestDiff::COMMITS_SAFE_SIZE} commits.
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment