BigW Consortium Gitlab

_new_commit_form.html.haml 747 Bytes
Newer Older
1 2
= render 'shared/commit_message_container', placeholder: placeholder

3
- if @project.empty_repo?
4
  = hidden_field_tag 'branch_name', @ref
5 6 7
- else
  - if can?(current_user, :push_code, @project)
    .form-group.branch
8
      = label_tag 'branch_name', _('Target Branch'), class: 'control-label'
9
      .col-sm-10
10
        = text_field_tag 'branch_name', @branch_name || tree_edit_branch, required: true, class: "form-control js-branch-name ref-name"
11

12
        .js-create-merge-request-container
13
          = render 'shared/new_merge_request_checkbox'
14
  - else
15
    = hidden_field_tag 'branch_name', @branch_name || tree_edit_branch
16
    = hidden_field_tag 'create_merge_request', 1
17 18

  = hidden_field_tag 'original_branch', @ref, class: 'js-original-branch'