2017-02-09 07:25:46 -05:00
|
|
|
- with_label = local_assigns.fetch(:with_label, true)
|
|
|
|
|
2022-07-12 14:08:46 -04:00
|
|
|
.visibility-level-setting
|
2017-02-09 07:25:46 -05:00
|
|
|
- if with_label
|
2020-05-25 02:08:38 -04:00
|
|
|
= f.label :visibility_level, _('Visibility level'), class: 'label-bold gl-mb-0'
|
2018-10-15 09:36:19 -04:00
|
|
|
%p
|
|
|
|
= _('Who can see this group?')
|
2022-06-27 17:08:29 -04:00
|
|
|
- visibility_docs_path = help_page_path('user/public_access')
|
2018-10-15 09:36:19 -04:00
|
|
|
- docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: visibility_docs_path }
|
2021-09-10 08:10:27 -04:00
|
|
|
= _('%{docs_link_start}Learn about visibility levels.%{docs_link_end}').html_safe % { docs_link_start: docs_link_start, docs_link_end: '</a>'.html_safe }
|
2018-10-15 09:36:19 -04:00
|
|
|
- if can_change_visibility_level
|
|
|
|
= render('shared/visibility_radios', model_method: :visibility_level, form: f, selected_level: visibility_level, form_model: form_model)
|
|
|
|
- else
|
|
|
|
%div
|
|
|
|
%span.info
|
|
|
|
= visibility_level_icon(visibility_level)
|
|
|
|
%strong
|
|
|
|
= visibility_level_label(visibility_level)
|
|
|
|
.light= visibility_level_description(visibility_level, form_model)
|