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
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/projects/compare/show.html.haml')
-rw-r--r--app/views/projects/compare/show.html.haml11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/views/projects/compare/show.html.haml b/app/views/projects/compare/show.html.haml
index 9e9c271e7be..1fc067b6be1 100644
--- a/app/views/projects/compare/show.html.haml
+++ b/app/views/projects/compare/show.html.haml
@@ -6,8 +6,15 @@
#js-compare-selector{ data: project_compare_selector_data(@project, @merge_request, params) }
- if @commits.present?
- = render "projects/commits/commit_list"
- = render "projects/diffs/diffs", diffs: @diffs, environment: @environment, diff_page_context: "is-compare"
+ -# Only show commit list in the first page
+ - hide_commit_list = params[:page].present? && params[:page] != '1'
+ = render "projects/commits/commit_list" unless hide_commit_list
+ = render "projects/diffs/diffs",
+ diffs: @diffs,
+ environment: @environment,
+ diff_page_context: "is-compare",
+ paginate_diffs: true,
+ paginate_diffs_per_page: Projects::CompareController::COMMIT_DIFFS_PER_PAGE
- else
.card.bg-light
.center