20 lines
856 B
Text
20 lines
856 B
Text
- if @merge_request.open?
|
|
= render 'projects/merge_requests/widget/open'
|
|
- elsif @merge_request.merged?
|
|
= render 'projects/merge_requests/widget/merged'
|
|
- elsif @merge_request.closed?
|
|
= render 'projects/merge_requests/widget/closed'
|
|
- elsif @merge_request.locked?
|
|
= render 'projects/merge_requests/widget/locked'
|
|
|
|
:javascript
|
|
var merge_request_widget;
|
|
|
|
merge_request_widget = new MergeRequestWidget({
|
|
url_to_automerge_check: "#{automerge_check_namespace_project_merge_request_path(@project.namespace, @project, @merge_request)}",
|
|
check_enable: #{@merge_request.unchecked? ? "true" : "false"},
|
|
url_to_ci_check: "#{ci_status_namespace_project_merge_request_path(@project.namespace, @project, @merge_request)}",
|
|
ci_enable: #{@project.ci_service ? "true" : "false"},
|
|
current_status: "#{@merge_request.automerge_status}",
|
|
});
|
|
|