BigW Consortium Gitlab

_visibility_radios.html.haml 638 Bytes
Newer Older
Vinnie Okada committed
1
- Gitlab::VisibilityLevel.values.each do |level|
2
  - next if skip_level?(form_model, level)
Vinnie Okada committed
3 4
  .radio
    - restricted = restricted_visibility_levels.include?(level)
5
    = form.label "#{model_method}_#{level}" do
Vinnie Okada committed
6 7 8 9 10 11 12
      = form.radio_button model_method, level, checked: (selected_level == level), disabled: restricted
      = visibility_level_icon(level)
      .option-title
        = visibility_level_label(level)
      .option-descr
        = visibility_level_description(level, form_model)
- unless restricted_visibility_levels.empty?
13
  %div
Vinnie Okada committed
14 15
    %span.info
      Some visibility level settings have been restricted by the administrator.