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
8eef877c
Commit
8eef877c
authored
Aug 19, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use snake_case for Ruby variables
parent
fc8fa9bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
app/views/projects/protected_branches/_access_level_dropdown.html.haml
...jects/protected_branches/_access_level_dropdown.html.haml
+9
-9
No files found.
app/views/projects/protected_branches/_access_level_dropdown.html.haml
View file @
8eef877c
-
default
L
abel
=
'Select'
-
dropdown
Label
=
defaultL
abel
-
default
_l
abel
=
'Select'
-
dropdown
_label
=
default_l
abel
%div
{
class:
"#{input_basic_name}-container"
}
-
if
access_levels
.
present?
-
access_levels
.
map
.
with_index
do
|
level
,
i
|
-
if
(
level
.
type
==
:user
)
-
field
K
ey
=
'user_id'
-
if
level
.
type
==
:user
-
field
_k
ey
=
'user_id'
-
value
=
level
.
user_id
-
else
-
field
K
ey
=
'access_level'
-
field
_k
ey
=
'access_level'
-
value
=
level
.
access_level
%input
{
type:
'hidden'
,
name:
"protected_branch[#{input_basic_name}_attributes][#{i}][#{field
K
ey}]"
,
%input
{
type:
'hidden'
,
name:
"protected_branch[#{input_basic_name}_attributes][#{i}][#{field
_k
ey}]"
,
value:
value
,
data:
{
type:
level
.
type
,
id:
level
.
id
}
}
-
dropdown
L
abel
=
[
pluralize
(
level_frequencies
[
:role
],
'role'
),
pluralize
(
level_frequencies
[
:user
],
'user'
)].
to_sentence
-
dropdown
_l
abel
=
[
pluralize
(
level_frequencies
[
:role
],
'role'
),
pluralize
(
level_frequencies
[
:user
],
'user'
)].
to_sentence
=
dropdown_tag
(
dropdown
L
abel
,
options:
{
toggle_class:
"
#{
toggle_class
}
js-multiselect"
,
dropdown_class:
'dropdown-menu-user dropdown-menu-selectable'
,
filter:
true
,
data:
{
default_label:
default
L
abel
}
})
=
dropdown_tag
(
dropdown
_l
abel
,
options:
{
toggle_class:
"
#{
toggle_class
}
js-multiselect"
,
dropdown_class:
'dropdown-menu-user dropdown-menu-selectable'
,
filter:
true
,
data:
{
default_label:
default
_l
abel
}
})
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