42 lines
1.9 KiB
Plaintext
42 lines
1.9 KiB
Plaintext
= form_for [@project.namespace.becomes(Namespace), @project, @protected_branch] do |f|
|
|
.panel.panel-default
|
|
.panel-heading
|
|
%h3.panel-title
|
|
Protect a branch
|
|
.panel-body
|
|
.form-horizontal
|
|
= form_errors(@protected_branch)
|
|
.form-group
|
|
= f.label :name, class: 'col-md-2 text-right' do
|
|
Branch:
|
|
.col-md-10
|
|
= render partial: "projects/protected_branches/dropdown", locals: { f: f }
|
|
.help-block
|
|
= link_to 'Wildcards', help_page_path('user/project/protected_branches', anchor: 'wildcard-protected-branches')
|
|
such as
|
|
%code *-stable
|
|
or
|
|
%code production/*
|
|
are supported
|
|
.form-group
|
|
%label.col-md-2.text-right{ for: 'merge_access_levels_attributes' }
|
|
Allowed to merge:
|
|
.col-md-10
|
|
.merge_access_levels-container
|
|
= dropdown_tag('Select',
|
|
options: { toggle_class: 'js-allowed-to-merge wide',
|
|
dropdown_class: 'dropdown-menu-selectable capitalize-header',
|
|
data: { field_name: 'protected_branch[merge_access_levels_attributes][0][access_level]', input_id: 'merge_access_levels_attributes' }})
|
|
.form-group
|
|
%label.col-md-2.text-right{ for: 'push_access_levels_attributes' }
|
|
Allowed to push:
|
|
.col-md-10
|
|
.push_access_levels-container
|
|
= dropdown_tag('Select',
|
|
options: { toggle_class: 'js-allowed-to-push wide',
|
|
dropdown_class: 'dropdown-menu-selectable capitalize-header',
|
|
data: { field_name: 'protected_branch[push_access_levels_attributes][0][access_level]', input_id: 'push_access_levels_attributes' }})
|
|
|
|
.panel-footer
|
|
= f.submit 'Protect', class: 'btn-create btn', disabled: true
|