debian-mirror-gitlab/app/views/shared/_visibility_radios.html.haml

20 lines
1 KiB
Text
Raw Normal View History

2015-09-11 14:41:01 +05:30
- Gitlab::VisibilityLevel.values.each do |level|
2018-03-17 18:26:18 +05:30
- disallowed = disallowed_visibility_level?(form_model, level)
- restricted = restricted_visibility_levels.include?(level)
2019-09-30 21:07:59 +05:30
- next if disallowed || restricted
.form-check
2019-12-04 20:38:33 +05:30
= 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: "", qa_selector: "#{visibility_level_label(level).downcase}_radio" }
2018-11-08 19:23:39 +05:30
= form.label "#{model_method}_#{level}", class: 'form-check-label' do
2015-09-11 14:41:01 +05:30
= visibility_level_icon(level)
.option-title
= visibility_level_label(level)
2018-03-17 18:26:18 +05:30
.option-description
2015-09-11 14:41:01 +05:30
= visibility_level_description(level, form_model)
2019-09-30 21:07:59 +05:30
.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.')