2018-02-23 12:30:37 -05:00
|
|
|
- issuable = local_assigns.fetch(:issuable)
|
|
|
|
- form = local_assigns.fetch(:form)
|
|
|
|
|
|
|
|
- return unless issuable.is_a?(MergeRequest)
|
|
|
|
- return unless issuable.for_fork?
|
|
|
|
- return unless can?(current_user, :push_code, issuable.source_project)
|
|
|
|
|
|
|
|
%hr
|
|
|
|
|
2018-06-08 12:54:48 -04:00
|
|
|
.form-group.row
|
|
|
|
%label.col-form-label.col-sm-2
|
2018-02-23 12:30:37 -05:00
|
|
|
= _('Contribution')
|
|
|
|
.col-sm-10
|
2018-06-08 12:54:48 -04:00
|
|
|
.form-check.prepend-top-5
|
2018-05-22 21:54:57 -04:00
|
|
|
= form.check_box :allow_collaboration, disabled: !issuable.can_allow_collaboration?(current_user), class: 'form-check-input'
|
|
|
|
= form.label :allow_collaboration, class: 'form-check-label' do
|
|
|
|
= _('Allow commits from members who can merge to the target branch.')
|
2019-05-09 10:42:45 -04:00
|
|
|
= link_to 'About this feature', help_page_path('user/project/merge_requests/allow_collaboration'), target: '_blank', rel: 'noopener noreferrer nofollow'
|
2018-04-11 14:26:37 -04:00
|
|
|
.form-text.text-muted
|
2018-05-22 21:54:57 -04:00
|
|
|
= allow_collaboration_unavailable_reason(issuable)
|