diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-09 18:07:50 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-09 18:07:50 +0000 |
commit | 20f6a17ba2d2d5f056bda38dfe85e2a7b2a82d0b (patch) | |
tree | 1319f393750fa7a212455746273c05465d786fde /app/views/projects | |
parent | e38a99eb0725697297386dd0bb1045b1fd55493a (diff) | |
download | gitlab-ce-20f6a17ba2d2d5f056bda38dfe85e2a7b2a82d0b.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/projects')
-rw-r--r-- | app/views/projects/commits/_commits.html.haml | 7 | ||||
-rw-r--r-- | app/views/projects/merge_requests/_commits.html.haml | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/app/views/projects/commits/_commits.html.haml b/app/views/projects/commits/_commits.html.haml index bb3a38d6ac8..b5ecc9b0193 100644 --- a/app/views/projects/commits/_commits.html.haml +++ b/app/views/projects/commits/_commits.html.haml @@ -33,16 +33,15 @@ - else = render partial: 'projects/commits/commit', collection: context_commits, locals: { project: project, ref: ref, merge_request: merge_request } -- if hidden > 0 +- if hidden > 0 && !@merge_request %li = render Pajamas::AlertComponent.new(variant: :warning, dismissible: false) do |c| = c.body do = n_('%s additional commit has been omitted to prevent performance issues.', '%s additional commits have been omitted to prevent performance issues.', hidden) % number_with_delimiter(hidden) -- if can_update_merge_request && context_commits&.empty? - = render Pajamas::ButtonComponent.new(button_options: { class: 'gl-mt-5 add-review-item-modal-trigger', data: { context_commits_empty: 'true' } }) do - = _('Add previously merged commits') +- if can_update_merge_request && context_commits&.empty? && !(defined?(@next_page) && @next_page) + .add-review-item-modal-trigger{ data: { context_commits_empty: 'true' } } - if commits.size == 0 && context_commits.nil? .commits-empty.gl-mt-6 diff --git a/app/views/projects/merge_requests/_commits.html.haml b/app/views/projects/merge_requests/_commits.html.haml index 7cadc37b0fd..ee0ab984d6f 100644 --- a/app/views/projects/merge_requests/_commits.html.haml +++ b/app/views/projects/merge_requests/_commits.html.haml @@ -13,6 +13,9 @@ - else %ol#commits-list.list-unstyled = render "projects/commits/commits", merge_request: @merge_request + - if @next_page && @merge_request + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-load-more-commits', data: { next_page: @next_page } }) do + = _('Load more') -- if can_update_merge_request && @merge_request.iid +- if can_update_merge_request && @merge_request.iid && !@next_page .add-review-item-modal-wrapper{ data: { context_commits_path: context_commits_project_json_merge_request_url(@merge_request&.project, @merge_request, :json), target_branch: @merge_request.target_branch, merge_request_iid: @merge_request.iid, project_id: @merge_request.project.id } } |