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
e9f48335
Commit
e9f48335
authored
Aug 16, 2016
by
Timothy Andrew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move the "update" portion of the protected branch view into a partial.
1. To improve EE compatibility.
parent
4c28d626
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
app/views/projects/protected_branches/_protected_branch.html.haml
...s/projects/protected_branches/_protected_branch.html.haml
+3
-10
app/views/projects/protected_branches/_update_protected_branch.html.haml
...cts/protected_branches/_update_protected_branch.html.haml
+10
-0
No files found.
app/views/projects/protected_branches/_protected_branch.html.haml
View file @
e9f48335
...
...
@@ -13,16 +13,9 @@
=
time_ago_with_tooltip
(
commit
.
committed_date
)
-
else
(branch was removed from repository)
%td
=
hidden_field_tag
"allowed_to_merge_
#{
protected_branch
.
id
}
"
,
protected_branch
.
merge_access_levels
.
first
.
access_level
=
dropdown_tag
(
(
protected_branch
.
merge_access_levels
.
first
.
humanize
||
'Select'
)
,
options:
{
toggle_class:
'js-allowed-to-merge'
,
dropdown_class:
'dropdown-menu-selectable js-allowed-to-merge-container'
,
data:
{
field_name:
"allowed_to_merge_
#{
protected_branch
.
id
}
"
,
access_level_id:
protected_branch
.
merge_access_levels
.
first
.
id
}})
%td
=
hidden_field_tag
"allowed_to_push_
#{
protected_branch
.
id
}
"
,
protected_branch
.
push_access_levels
.
first
.
access_level
=
dropdown_tag
(
(
protected_branch
.
push_access_levels
.
first
.
humanize
||
'Select'
)
,
options:
{
toggle_class:
'js-allowed-to-push'
,
dropdown_class:
'dropdown-menu-selectable js-allowed-to-push-container'
,
data:
{
field_name:
"allowed_to_push_
#{
protected_branch
.
id
}
"
,
access_level_id:
protected_branch
.
push_access_levels
.
first
.
id
}})
=
render
partial:
'update_protected_branch'
,
locals:
{
protected_branch:
protected_branch
}
-
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'
app/views/projects/protected_branches/_update_protected_branch.html.haml
0 → 100644
View file @
e9f48335
%td
=
hidden_field_tag
"allowed_to_merge_
#{
protected_branch
.
id
}
"
,
protected_branch
.
merge_access_levels
.
first
.
access_level
=
dropdown_tag
(
(
protected_branch
.
merge_access_levels
.
first
.
humanize
||
'Select'
)
,
options:
{
toggle_class:
'js-allowed-to-merge'
,
dropdown_class:
'dropdown-menu-selectable js-allowed-to-merge-container'
,
data:
{
field_name:
"allowed_to_merge_
#{
protected_branch
.
id
}
"
,
access_level_id:
protected_branch
.
merge_access_levels
.
first
.
id
}})
%td
=
hidden_field_tag
"allowed_to_push_
#{
protected_branch
.
id
}
"
,
protected_branch
.
push_access_levels
.
first
.
access_level
=
dropdown_tag
(
(
protected_branch
.
push_access_levels
.
first
.
humanize
||
'Select'
)
,
options:
{
toggle_class:
'js-allowed-to-push'
,
dropdown_class:
'dropdown-menu-selectable js-allowed-to-push-container'
,
data:
{
field_name:
"allowed_to_push_
#{
protected_branch
.
id
}
"
,
access_level_id:
protected_branch
.
push_access_levels
.
first
.
id
}})
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