debian-mirror-gitlab/app/views/shared/_new_commit_form.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
937 B
Text
Raw Normal View History

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
2021-04-17 20:07:23 +05:30
- if project.empty_repo?
- ref = local_assigns[:ref] || @ref
2021-12-11 22:18:48 +05:30
= hidden_field_tag 'branch_name', ref, class: 'js-branch-name'
- else
- if can?(current_user, :push_code, @project)
2023-07-09 08:55:56 +05:30
.form-group.branch
= label_tag 'branch_name', _('Target Branch')
= 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
2023-07-09 08:55:56 +05:30
.js-create-merge-request-container
= 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
- else
2018-03-27 19:54:05 +05:30
= hidden_field_tag 'branch_name', branch_name
= 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'