Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e9e16258
Commit
e9e16258
authored
Aug 19, 2016
by
Timothy Andrew
Committed by
Alfredo Sumaran
Aug 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove access level editing from the `ProtectedBranches#show` page.
1. This has been moved to the `#index` page.
parent
1565a370
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
76 deletions
+0
-76
app/controllers/projects/protected_branches_controller.rb
app/controllers/projects/protected_branches_controller.rb
+0
-7
app/views/projects/protected_branches/_access_settings.html.haml
...ws/projects/protected_branches/_access_settings.html.haml
+0
-62
app/views/projects/protected_branches/show.html.haml
app/views/projects/protected_branches/show.html.haml
+0
-7
No files found.
app/controllers/projects/protected_branches_controller.rb
View file @
e9e16258
...
@@ -26,7 +26,6 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController
...
@@ -26,7 +26,6 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController
def
show
def
show
@matching_branches
=
@protected_branch
.
matching
(
@project
.
repository
.
branches
)
@matching_branches
=
@protected_branch
.
matching
(
@project
.
repository
.
branches
)
load_gon_show
end
end
def
update
def
update
...
@@ -82,10 +81,4 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController
...
@@ -82,10 +81,4 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController
params
.
merge!
(
current_project_id:
@project
.
id
)
if
@project
params
.
merge!
(
current_project_id:
@project
.
id
)
if
@project
gon
.
push
(
params
.
merge
(
access_levels_options
))
gon
.
push
(
params
.
merge
(
access_levels_options
))
end
end
def
load_gon_show
params
=
{}
params
.
merge!
(
current_project_id:
@project
.
id
)
if
@project
gon
.
push
(
params
.
merge
(
access_levels_options
))
end
end
end
app/views/projects/protected_branches/_access_settings.html.haml
deleted
100644 → 0
View file @
1565a370
-
url
=
namespace_project_protected_branch_path
(
@project
.
namespace
,
@project
,
@protected_branch
)
%h5
Access Settings
.form-group.allowed-to-merge-container
.prepend-left-10
%h5
.label-light.append-bottom-20
Allowed to merge
-
if
@protected_branch
.
merge_access_levels
.
present?
.table-responsive
%table
.table.protected-branch-merge-access-list
%colgroup
%col
{
width:
"70%"
}
%col
{
width:
"30%"
}
%thead
%tr
%th
User / Role
%th
%tbody
-
@protected_branch
.
merge_access_levels
.
each
do
|
access_level
|
%tr
%td
=
access_level
.
humanize
%td
%button
.btn.btn-sm.btn-warning.pull-right
=
link_to
"Delete"
,
namespace_project_protected_branch_merge_access_level_path
(
@project
.
namespace
,
@project
,
@protected_branch
,
access_level
),
method: :delete
,
data:
{
confirm:
"Are you sure?"
}
-
else
%p
.settings-message.text-center
No merge access settings have been created yet.
=
dropdown_tag
(
"Add new"
,
options:
{
toggle_class:
'allowed-to-merge btn btn-success btn-sm'
,
toggle_link:
true
,
dropdown_class:
'dropdown-menu-selectable dropdown-menu-user'
,
filter:
true
,
data:
{
url:
url
,
type:
'merge_access_levels'
}})
.form-group.allowed-to-push-container
.prepend-left-10.prepend-top-10
%h5
.label-light.append-bottom-20
Allowed to push
-
if
@protected_branch
.
push_access_levels
.
present?
.table-responsive
%table
.table.protected-branch-push-access-list
%colgroup
%col
{
width:
"70%"
}
%col
{
width:
"30%"
}
%thead
%tr
%th
User / Role
%th
%tbody
-
@protected_branch
.
push_access_levels
.
each
do
|
access_level
|
%tr
%td
=
access_level
.
humanize
%td
%button
.btn.btn-sm.btn-warning.pull-right
=
link_to
"Delete"
,
namespace_project_protected_branch_push_access_level_path
(
@project
.
namespace
,
@project
,
@protected_branch
,
access_level
),
method: :delete
,
data:
{
confirm:
"Are you sure?"
}
-
else
%p
.settings-message.text-center
No push access settings have been created yet.
=
dropdown_tag
(
"Add new"
,
options:
{
toggle_class:
'allowed-to-push btn btn-success btn-sm'
,
toggle_link:
true
,
dropdown_class:
'dropdown-menu-selectable dropdown-menu-user'
,
filter:
true
,
data:
{
url:
url
,
type:
'push_access_levels'
}})
app/views/projects/protected_branches/show.html.haml
View file @
e9e16258
...
@@ -6,10 +6,6 @@
...
@@ -6,10 +6,6 @@
=
@protected_branch
.
name
=
@protected_branch
.
name
.col-lg-9.edit_protected_branch
.col-lg-9.edit_protected_branch
=
render
'access_settings'
%hr
%h5
Matching Branches
%h5
Matching Branches
-
if
@matching_branches
.
present?
-
if
@matching_branches
.
present?
.table-responsive
.table-responsive
...
@@ -27,6 +23,3 @@
...
@@ -27,6 +23,3 @@
-
else
-
else
%p
.settings-message.text-center
%p
.settings-message.text-center
Couldn't find any matching branches.
Couldn't find any matching branches.
:javascript
new
ProtectedBranchesAccessSelect
(
$
(
"
.edit_protected_branch
"
),
true
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment