Welcome to mirror list, hosted at ThFree Co, Russian Federation.

new.html.haml « branches « projects « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 91efd5ef048ccfd5744bbb8a805881dd023ecbb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
- page_title _("New Branch")
- default_ref = params[:ref] || @project.default_branch

- if @error
  = render Pajamas::AlertComponent.new(variant: :danger) do |c|
    = c.body do
      = @error
%h1.page-title.gl-font-size-h-display
  = _('New Branch')
%hr

= form_tag namespace_project_branches_path, method: :post, id: "new-branch-form", class: "js-create-branch-form js-requires-input" do
  .form-group.row
    = label_tag :branch_name, _('Branch name'), class: 'col-form-label col-sm-2'
    .col-sm-10
      = text_field_tag :branch_name, params[:branch_name], required: true, autofocus: true, class: 'form-control js-branch-name monospace'
      .form-text.text-muted.text-danger.js-branch-name-error
  .form-group.row
    = label_tag :ref, _('Create from'), class: 'col-form-label col-sm-2'
    .col-sm-auto.create-from
      .js-new-branch-ref-selector{ data: { project_id: @project.id, default_branch_name: default_ref, hidden_input_name: 'ref' } }
      .form-text.text-muted
        = _('Existing branch name, tag, or commit SHA')
  .form-actions
    = render Pajamas::ButtonComponent.new(variant: :confirm, button_options: { type: 'submit', class: 'gl-mr-3' }) do
      = _('Create branch')
    = link_to _('Cancel'), project_branches_path(@project), class: 'gl-button btn btn-default btn-cancel'