2020-08-04 18:09:49 +00:00
|
|
|
- can_update_merge_request = can?(current_user, :update_merge_request, @merge_request)
|
|
|
|
|
|
|
|
- if @commits.empty? && @context_commits.empty?
|
|
|
|
.commits-empty.mt-5
|
2016-12-28 15:09:15 +00:00
|
|
|
= custom_icon ('illustration_no_commits')
|
2020-08-04 18:09:49 +00:00
|
|
|
%h4
|
|
|
|
= _('There are no commits yet.')
|
|
|
|
- if @project&.context_commits_enabled? && can_update_merge_request
|
|
|
|
%p
|
|
|
|
= _('Push commits to the source branch or add previously merged commits to review them.')
|
2021-01-27 21:09:12 +00:00
|
|
|
%button.btn.gl-button.btn-confirm.add-review-item-modal-trigger{ type: "button", data: { commits_empty: 'true', context_commits_empty: 'true' } }
|
2020-08-04 18:09:49 +00:00
|
|
|
= _('Add previously merged commits')
|
2016-12-28 15:09:15 +00:00
|
|
|
- else
|
|
|
|
%ol#commits-list.list-unstyled
|
2017-06-29 21:19:09 +00:00
|
|
|
= render "projects/commits/commits", merge_request: @merge_request
|
2020-08-04 18:09:49 +00:00
|
|
|
|
|
|
|
- if @project&.context_commits_enabled? && can_update_merge_request && @merge_request.iid
|
|
|
|
.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 } }
|