2015-04-26 01:01:52 -04:00
|
|
|
- Gitlab::VisibilityLevel.values.each do |level|
|
2017-08-25 14:46:49 -04:00
|
|
|
- disallowed = disallowed_visibility_level?(form_model, level)
|
|
|
|
- restricted = restricted_visibility_levels.include?(level)
|
2019-06-28 17:38:26 -04:00
|
|
|
- next if disallowed || restricted
|
|
|
|
|
|
|
|
.form-check
|
2019-07-16 08:44:15 -04:00
|
|
|
= form.radio_button model_method, level, checked: (selected_level == level), class: 'form-check-input', data: { track_label: "blank_project", track_event: "activate_form_input", track_property: "#{model_method}_#{level}", track_value: "" }
|
2018-05-31 15:20:46 -04:00
|
|
|
= form.label "#{model_method}_#{level}", class: 'form-check-label' do
|
2015-04-26 01:01:52 -04:00
|
|
|
= visibility_level_icon(level)
|
|
|
|
.option-title
|
|
|
|
= visibility_level_label(level)
|
2017-08-25 14:48:15 -04:00
|
|
|
.option-description
|
2015-04-26 01:01:52 -04:00
|
|
|
= visibility_level_description(level, form_model)
|
2019-06-28 17:38:26 -04:00
|
|
|
|
|
|
|
.text-muted
|
|
|
|
- if all_visibility_levels_restricted?
|
|
|
|
= _('Visibility settings have been disabled by the administrator.')
|
|
|
|
- elsif multiple_visibility_levels_restricted?
|
|
|
|
= _('Other visibility settings have been disabled by the administrator.')
|