summaryrefslogtreecommitdiff
path: root/app/views/projects/protected_branches/_create_protected_branch.html.haml
diff options
context:
space:
mode:
authorHiroyuki Sato <sathiroyuki@gmail.com>2017-07-23 21:26:02 +0900
committerHiroyuki Sato <sathiroyuki@gmail.com>2017-07-23 21:26:02 +0900
commit9b25bbc45d4e6602452e230506601ff0ed8ba84a (patch)
tree95f7326e4162a325a5e7c7304c33f18194b52cbe /app/views/projects/protected_branches/_create_protected_branch.html.haml
parent839018d2d4e3e899b1fa06a43d093a0fdceced42 (diff)
parentb92d5135d8522e1370636799d74b51f9a37d0b2f (diff)
downloadgitlab-ce-9b25bbc45d4e6602452e230506601ff0ed8ba84a.tar.gz
Merge branch 'master' into 1827-prevent-concurrent-editing-wiki
Conflicts: app/controllers/projects/wikis_controller.rb app/views/projects/wikis/edit.html.haml spec/features/projects/wiki/user_updates_wiki_page_spec.rb
Diffstat (limited to 'app/views/projects/protected_branches/_create_protected_branch.html.haml')
-rw-r--r--app/views/projects/protected_branches/_create_protected_branch.html.haml53
1 files changed, 13 insertions, 40 deletions
diff --git a/app/views/projects/protected_branches/_create_protected_branch.html.haml b/app/views/projects/protected_branches/_create_protected_branch.html.haml
index b8e885b4d9a..98d56a3e5c5 100644
--- a/app/views/projects/protected_branches/_create_protected_branch.html.haml
+++ b/app/views/projects/protected_branches/_create_protected_branch.html.haml
@@ -1,41 +1,14 @@
-= 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',
- 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',
- data: { field_name: 'protected_branch[push_access_levels_attributes][0][access_level]', input_id: 'push_access_levels_attributes' }})
+- content_for :merge_access_levels do
+ .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' }})
+- content_for :push_access_levels do
+ .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
+= render 'projects/protected_branches/shared/create_protected_branch'