Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gpt
large_projects
gitlabhq1
Commits
1c54d4aa
Unverified
Commit
1c54d4aa
authored
6 years ago
by
Rémy Coutable
Browse files
Options
Download
Email Patches
Plain Diff
Further streamline protected branches views
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
d7e0ba84
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
11 deletions
+37
-11
app/views/projects/protected_branches/_index.html.haml
app/views/projects/protected_branches/_index.html.haml
+0
-0
app/views/projects/protected_branches/_update_protected_branch.html.haml
...cts/protected_branches/_update_protected_branch.html.haml
+14
-8
app/views/projects/protected_tags/_index.html.haml
app/views/projects/protected_tags/_index.html.haml
+0
-0
app/views/projects/settings/_access_level_dropdown.html.haml
app/views/projects/settings/_access_level_dropdown.html.haml
+20
-0
app/views/projects/settings/repository/_protected_refs.html.haml
...ws/projects/settings/repository/_protected_refs.html.haml
+2
-2
qa/qa/page/project/settings/repository.rb
qa/qa/page/project/settings/repository.rb
+1
-1
No files found.
app/views/projects/protected_branches/
shared/
_index.html.haml
→
app/views/projects/protected_branches/_index.html.haml
View file @
1c54d4aa
File moved
This diff is collapsed.
Click to expand it.
app/views/projects/protected_branches/_update_protected_branch.html.haml
View file @
1c54d4aa
-
merge_access_level
=
protected_branch
.
merge_access_levels
.
first
-
push_access_level
=
protected_branch
.
push_access_levels
.
first
%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 qa-allowed-to-merge'
,
dropdown_class:
'dropdown-menu-selectable js-allowed-to-merge-container capitalize-header'
,
data:
{
field_name:
"allowed_to_merge_
#{
protected_branch
.
id
}
"
,
access_level_id:
protected_branch
.
merge_access_levels
.
first
.
id
}})
=
render
'projects/settings/access_level_dropdown'
,
verb:
'merge'
,
protected_ref:
protected_branch
,
access_level:
merge_access_level
,
extra_toggle_classes:
%w[qa-allowed-to-merge]
%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 capitalize-header'
,
data:
{
field_name:
"allowed_to_push_
#{
protected_branch
.
id
}
"
,
access_level_id:
protected_branch
.
push_access_levels
.
first
.
id
}})
=
render
'projects/settings/access_level_dropdown'
,
verb:
'push'
,
protected_ref:
protected_branch
,
access_level:
push_access_level
,
extra_toggle_classes:
%w[qa-allowed-to-push]
This diff is collapsed.
Click to expand it.
app/views/projects/protected_tags/
shared/
_index.html.haml
→
app/views/projects/protected_tags/_index.html.haml
View file @
1c54d4aa
File moved
This diff is collapsed.
Click to expand it.
app/views/projects/settings/_access_level_dropdown.html.haml
0 → 100644
View file @
1c54d4aa
-
verb
=
local_assigns
.
fetch
(
:verb
)
-
protected_ref
=
local_assigns
.
fetch
(
:protected_ref
)
-
access_level
=
local_assigns
.
fetch
(
:access_level
)
-
disabled
=
local_assigns
.
fetch
(
:disabled
,
false
)
-
filter
=
local_assigns
.
fetch
(
:filter
,
false
)
-
extra_toggle_classes
=
local_assigns
.
fetch
(
:extra_toggle_classes
,
[])
-
extra_dropdown_classes
=
local_assigns
.
fetch
(
:extra_dropdown_classes
,
[])
-
preselected_items
=
local_assigns
.
fetch
(
:preselected_items
,
nil
)
-
default_label
=
s_
(
'RepositorySettingsAccessLevel|Select'
)
=
hidden_field_tag
"allowed_to_
#{
verb
}
_
#{
protected_ref
.
id
}
"
,
access_level
=
dropdown_tag
((
access_level
&
.
humanize
||
default_label
),
options:
{
toggle_class:
%W[js-allowed-to-
#{
verb
}
]
.
concat
(
extra_toggle_classes
).
join
(
' '
),
disabled:
disabled
,
dropdown_class:
%W[dropdown-menu-selectable js-allowed-to-
#{
verb
}
-container capitalize-header]
.
concat
(
extra_dropdown_classes
).
join
(
' '
),
filter:
filter
,
data:
{
field_name:
"allowed_to_
#{
verb
}
_
#{
protected_ref
.
id
}
"
,
default_label:
default_label
,
access_level_id:
access_level
&
.
id
,
preselected_items:
preselected_items
}
})
This diff is collapsed.
Click to expand it.
app/views/projects/settings/repository/_protected_refs.html.haml
View file @
1c54d4aa
-
project
=
local_assigns
.
fetch
(
:project
)
=
render
'projects/protected_branches/
shared/
index'
=
render
'projects/protected_tags/
shared/
index'
=
render
'projects/protected_branches/index'
=
render
'projects/protected_tags/index'
This diff is collapsed.
Click to expand it.
qa/qa/page/project/settings/repository.rb
View file @
1c54d4aa
...
...
@@ -9,7 +9,7 @@ module QA
element
:deploy_keys_settings
end
view
'app/views/projects/protected_branches/
shared/
_index.html.haml'
do
view
'app/views/projects/protected_branches/_index.html.haml'
do
element
:protected_branches_settings
end
...
...
This diff is collapsed.
Click to expand it.
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