demarches-normaliennes/app/views/fields/features_field/_show.html.haml

15 lines
499 B
Text
Raw Normal View History

2018-11-08 17:13:48 +01:00
:ruby
url = if field.resource.class.name == 'Gestionnaire'
enable_feature_manager_gestionnaire_path(field.resource.id)
else
enable_feature_manager_administrateur_path(field.resource.id)
end
%table#features
- Flipflop.feature_set.features.each do |feature|
- if !feature.group || feature.group.key != :production
%tr
%td= feature.title
%td
2018-11-08 17:13:48 +01:00
= check_box_tag "enable-feature", "enable", field.data[feature.name], data: { url: url, key: feature.key }