gitlab-org--gitlab-foss/app/views/projects/_visibility_level.html.haml
Dmitriy Zaporozhets 4091322dba
Improve UX of project visiblity level. Improve "Public Access" help page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-27 13:13:33 +02:00

26 lines
1.1 KiB
Text

.control-group.project-visibility-level-holder
= f.label :visibility_level do
Visibility Level
= link_to "(?)", help_public_access_path
- if can_change_visibility_level
- Gitlab::VisibilityLevel.values.each do |level|
- restricted = restricted_visibility_levels.include?(level)
.controls
= f.radio_button :visibility_level, level, checked: (visibility_level == level), disabled: restricted
%span.descr{:class => ("restricted" if restricted)}
= label :project_visibility_level, level do
= visibility_level_icon(level)
%strong
= visibility_level_label(level)
.light= visibility_level_description(level)
- unless restricted_visibility_levels.empty?
.controls
%span.info
Some visibility level settings have been restricted by the administrator.
- else
.controls
%span.info
= visibility_level_icon(visibility_level)
%strong
= visibility_level_label(visibility_level)
.light= visibility_level_description(visibility_level)