BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
cf94db70
Unverified
Commit
cf94db70
authored
Nov 14, 2016
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed button styling from restricted visibility levels and added checkboxes with icons
Review changes
parent
36fa5d66
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
application_settings_helper.rb
app/helpers/application_settings_helper.rb
+5
-5
_form.html.haml
app/views/admin/application_settings/_form.html.haml
+1
-2
18136-ui-for-restricting-global-visibility-levels-is-unclear.yml
...i-for-restricting-global-visibility-levels-is-unclear.yml
+4
-0
No files found.
app/helpers/application_settings_helper.rb
View file @
cf94db70
...
...
@@ -50,14 +50,14 @@ module ApplicationSettingsHelper
def
restricted_level_checkboxes
(
help_block_id
)
Gitlab
::
VisibilityLevel
.
options
.
map
do
|
name
,
level
|
checked
=
restricted_visibility_levels
(
true
).
include?
(
level
)
css_class
=
'btn'
css_class
+=
' active'
if
checked
checkbox_name
=
'application_setting[restricted_visibility_levels][]'
css_class
=
checked
?
'active'
:
''
checkbox_name
=
"application_setting[restricted_visibility_levels][]"
label_tag
(
checkbox_
name
,
class:
css_class
)
do
label_tag
(
name
,
class:
css_class
)
do
check_box_tag
(
checkbox_name
,
level
,
checked
,
autocomplete:
'off'
,
'aria-describedby'
=>
help_block_id
)
+
name
'aria-describedby'
=>
help_block_id
,
id:
name
)
+
visibility_level_icon
(
level
)
+
name
end
end
end
...
...
app/views/admin/application_settings/_form.html.haml
View file @
cf94db70
...
...
@@ -22,9 +22,8 @@
.form-group
=
f
.
label
:restricted_visibility_levels
,
class:
'control-label col-sm-2'
.col-sm-10
-
data_attrs
=
{
toggle:
'buttons'
}
.btn-group
{
data:
data_attrs
}
-
restricted_level_checkboxes
(
'restricted-visibility-help'
).
each
do
|
level
|
.checkbox
=
level
%span
.help-block
#restricted-visibility-help
Selected levels cannot be used by non-admin users for projects or snippets.
...
...
changelogs/unreleased/18136-ui-for-restricting-global-visibility-levels-is-unclear.yml
0 → 100644
View file @
cf94db70
---
title
:
Changed restricted visibility admin buttons to checkboxes
merge_request
:
7463
author
:
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