diff options
Diffstat (limited to 'app/views/projects/diffs/_diffs.html.haml')
-rw-r--r-- | app/views/projects/diffs/_diffs.html.haml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/views/projects/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml index bb2682bb7c0..6f4ffecd5e0 100644 --- a/app/views/projects/diffs/_diffs.html.haml +++ b/app/views/projects/diffs/_diffs.html.haml @@ -5,7 +5,8 @@ - load_diff_files_async = Feature.enabled?(:async_commit_diff_files, @project) && diff_page_context == "is-commit" - paginate_diffs = local_assigns.fetch(:paginate_diffs, false) && !load_diff_files_async - paginate_diffs_per_page = local_assigns.fetch(:paginate_diffs_per_page, nil) -- diff_files = conditionally_paginate_diff_files(diffs, paginate: paginate_diffs, per: paginate_diffs_per_page) +- page = local_assigns.fetch(:page, nil) +- diff_files = conditionally_paginate_diff_files(diffs, paginate: paginate_diffs, page: page, per: paginate_diffs_per_page) .content-block.oneline-block.files-changed.diff-files-changed.js-diff-files-changed .files-changed-inner @@ -24,10 +25,10 @@ .btn-group.gl-ml-3 = inline_diff_btn = parallel_diff_btn - = render 'projects/diffs/stats', diff_files: diff_files + = render Diffs::StatsComponent.new(diff_files: diff_files) - if render_overflow_warning?(diffs) - = render 'projects/diffs/warning', diff_files: diffs + = render Diffs::OverflowWarningComponent.new(diffs: diffs, diff_files: diff_files, project: @project, commit: @commit, merge_request: @merge_request) .files{ data: { can_create_note: can_create_note } } - if load_diff_files_async |