2020-10-24 23:57:45 +05:30
|
|
|
- can_update_merge_request = can?(current_user, :update_merge_request, @merge_request)
|
|
|
|
|
|
|
|
- if @commits.empty? && @context_commits.empty?
|
|
|
|
.commits-empty.mt-5
|
2017-08-17 22:00:37 +05:30
|
|
|
= custom_icon ('illustration_no_commits')
|
2020-10-24 23:57:45 +05:30
|
|
|
%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.')
|
|
|
|
%button.btn.btn-primary.add-review-item-modal-trigger{ type: "button", data: { commits_empty: 'true', context_commits_empty: 'true' } }
|
|
|
|
= _('Add previously merged commits')
|
2017-08-17 22:00:37 +05:30
|
|
|
- else
|
|
|
|
%ol#commits-list.list-unstyled
|
2018-03-17 18:26:18 +05:30
|
|
|
= render "projects/commits/commits", merge_request: @merge_request
|
2020-10-24 23:57:45 +05:30
|
|
|
|
|
|
|
- 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 } }
|