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
c3c5bb59
Commit
c3c5bb59
authored
Aug 18, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set dropdown labels for protected branches
[ci skip]
parent
8c3b7ee6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
app/views/projects/protected_branches/_access_level_dropdown.html.haml
...jects/protected_branches/_access_level_dropdown.html.haml
+8
-2
No files found.
app/views/projects/protected_branches/_access_level_dropdown.html.haml
View file @
c3c5bb59
-
defaultLabel
=
'Select'
-
dropdownLabel
=
defaultLabel
-
access_by_type
=
protected_branch
.
merge_access_level_frequencies
-
if
access_levels
.
present?
-
access_levels
.
map
.
with_index
do
|
level
,
i
|
-
if
(
level
.
type
==
:user
)
...
...
@@ -8,6 +12,8 @@
-
value
=
level
.
access_level
%input
{
type:
'hidden'
,
name:
"protected_branch[#{input_basic_name}][#{i}][#{fieldKey}]"
,
value:
value
,
data:
{
type:
level
.
type
}
}
-
dropdownLabel
=
[
pluralize
(
access_by_type
[
:role
],
'role'
),
pluralize
(
access_by_type
[
:user
],
'user'
)].
to_sentence
=
dropdown_tag
(
'Select'
,
options:
{
toggle_class:
"
#{
toggle_class
}
js-multiselect"
,
dropdown_class:
'dropdown-menu-user dropdown-menu-selectable'
,
filter:
true
,
data:
{
default_label:
'Select'
}
})
=
dropdown_tag
(
dropdownLabel
,
options:
{
toggle_class:
"
#{
toggle_class
}
js-multiselect"
,
dropdown_class:
'dropdown-menu-user dropdown-menu-selectable'
,
filter:
true
,
data:
{
default_label:
defaultLabel
}
})
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