summaryrefslogtreecommitdiff
path: root/app/views/projects/protected_branches/_protected_branch.html.haml
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-08-03 15:32:00 -0700
committerDouwe Maan <douwe@selenight.nl>2016-08-03 15:32:00 -0700
commit538e66d71c0f7125cc62ea51480668ba8b342544 (patch)
treed27f667dbe404ce406e2ac6b3a901b87ff93da47 /app/views/projects/protected_branches/_protected_branch.html.haml
parent3ccb27c0c79ef92585a901de32339948319cf068 (diff)
parent8890376f0f72f713a7530bd7989e71442c69dc91 (diff)
downloadgitlab-ce-538e66d71c0f7125cc62ea51480668ba8b342544.tar.gz
Merge branch 'master' into diff-line-comment-vuejs
# Conflicts: # app/models/discussion.rb # db/schema.rb
Diffstat (limited to 'app/views/projects/protected_branches/_protected_branch.html.haml')
-rw-r--r--app/views/projects/protected_branches/_protected_branch.html.haml10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/views/projects/protected_branches/_protected_branch.html.haml b/app/views/projects/protected_branches/_protected_branch.html.haml
index 7fda7f96047..498e412235e 100644
--- a/app/views/projects/protected_branches/_protected_branch.html.haml
+++ b/app/views/projects/protected_branches/_protected_branch.html.haml
@@ -15,9 +15,15 @@
- else
(branch was removed from repository)
%td
- = check_box_tag("developers_can_push", protected_branch.id, protected_branch.developers_can_push, data: { url: url })
+ = hidden_field_tag "allowed_to_merge_#{protected_branch.id}", protected_branch.merge_access_level.access_level
+ = dropdown_tag(protected_branch.merge_access_level.humanize,
+ options: { title: "Allowed to merge", toggle_class: 'allowed-to-merge', dropdown_class: 'dropdown-menu-selectable merge',
+ data: { field_name: "allowed_to_merge_#{protected_branch.id}", url: url, id: protected_branch.id, type: "merge_access_level" }})
%td
- = check_box_tag("developers_can_merge", protected_branch.id, protected_branch.developers_can_merge, data: { url: url })
+ = hidden_field_tag "allowed_to_push_#{protected_branch.id}", protected_branch.push_access_level.access_level
+ = dropdown_tag(protected_branch.push_access_level.humanize,
+ options: { title: "Allowed to push", toggle_class: 'allowed-to-push', dropdown_class: 'dropdown-menu-selectable push',
+ data: { field_name: "allowed_to_push_#{protected_branch.id}", url: url, id: protected_branch.id, type: "push_access_level" }})
- if can_admin_project
%td
= link_to 'Unprotect', [@project.namespace.becomes(Namespace), @project, protected_branch], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: "btn btn-warning btn-sm pull-right"