diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-07-07 16:18:07 +0530 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-07-29 15:20:39 +0530 |
commit | ab6096c17261605d835a4a8edae21f31d90026df (patch) | |
tree | 0a4490cc0a62b86bf240fbc5bdff709b2e8d11b0 /app/views/projects/protected_branches/_branches_list.html.haml | |
parent | f8a04e15371815ad39e2c66056db4ab0439555f4 (diff) | |
download | gitlab-ce-ab6096c17261605d835a4a8edae21f31d90026df.tar.gz |
Add "No One Can Push" to the protected branches UI.
1. Move to dropdowns instead of checkboxes. One each for "Allowed to
Push" and "Allowed to Merge"
2. Refactor the `ProtectedBranches` coffeescript class into
`ProtectedBranchesAccessSelect`.
3. Modify the backend to accept the new parameters.
Diffstat (limited to 'app/views/projects/protected_branches/_branches_list.html.haml')
-rw-r--r-- | app/views/projects/protected_branches/_branches_list.html.haml | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/app/views/projects/protected_branches/_branches_list.html.haml b/app/views/projects/protected_branches/_branches_list.html.haml index 720d67dff7c..5f9f2992dca 100644 --- a/app/views/projects/protected_branches/_branches_list.html.haml +++ b/app/views/projects/protected_branches/_branches_list.html.haml @@ -5,24 +5,25 @@ No branches are protected, protect a branch with the form above. - else - can_admin_project = can?(current_user, :admin_project, @project) - .table-responsive - %table.table.protected-branches-list - %colgroup - %col{ width: "20%" } - %col{ width: "30%" } - %col{ width: "25%" } - %col{ width: "25%" } + + %table.table.protected-branches-list + %colgroup + %col{ width: "20%" } + %col{ width: "30%" } + %col{ width: "25%" } + %col{ width: "25%" } + %thead + %tr + %th Branch + %th Last commit + %th Allowed to Merge + %th Allowed to Push - if can_admin_project - %col - %thead - %tr - %th Protected Branch - %th Commit - %th Developers Can Push - %th Developers Can Merge - - if can_admin_project - %th - %tbody - = render partial: @protected_branches, locals: { can_admin_project: can_admin_project } + %th + %tbody + = render partial: @protected_branches, locals: { can_admin_project: can_admin_project } = paginate @protected_branches, theme: 'gitlab' + +:javascript + new ProtectedBranchesAccessSelect(); |