2018-03-27 19:54:05 +05:30
|
|
|
- project = @project.present(current_user: current_user)
|
|
|
|
- branch_name = selected_branch
|
|
|
|
|
2015-11-26 14:37:03 +05:30
|
|
|
= render 'shared/commit_message_container', placeholder: placeholder
|
|
|
|
|
2016-01-14 18:37:52 +05:30
|
|
|
- if @project.empty_repo?
|
2017-08-17 22:00:37 +05:30
|
|
|
= hidden_field_tag 'branch_name', @ref
|
2016-01-14 18:37:52 +05:30
|
|
|
- else
|
|
|
|
- if can?(current_user, :push_code, @project)
|
2018-11-08 19:23:39 +05:30
|
|
|
.form-group.row.branch
|
|
|
|
= label_tag 'branch_name', _('Target Branch'), class: 'col-form-label col-sm-2'
|
2016-01-14 18:37:52 +05:30
|
|
|
.col-sm-10
|
2021-03-11 19:13:27 +05:30
|
|
|
= text_field_tag 'branch_name', branch_name, required: true, class: "form-control gl-form-input js-branch-name ref-name"
|
2015-11-26 14:37:03 +05:30
|
|
|
|
2016-01-14 18:37:52 +05:30
|
|
|
.js-create-merge-request-container
|
2017-09-10 17:25:29 +05:30
|
|
|
= render 'shared/new_merge_request_checkbox'
|
2018-03-27 19:54:05 +05:30
|
|
|
- elsif project.can_current_user_push_to_branch?(branch_name)
|
|
|
|
= hidden_field_tag 'branch_name', branch_name
|
2016-01-14 18:37:52 +05:30
|
|
|
- else
|
2018-03-27 19:54:05 +05:30
|
|
|
= hidden_field_tag 'branch_name', branch_name
|
2016-01-14 18:37:52 +05:30
|
|
|
= hidden_field_tag 'create_merge_request', 1
|
2015-11-26 14:37:03 +05:30
|
|
|
|
|
|
|
= hidden_field_tag 'original_branch', @ref, class: 'js-original-branch'
|