28 lines
1.0 KiB
Plaintext
28 lines
1.0 KiB
Plaintext
<h2><%= t("admin.settings.index.feature_flags") %></h2>
|
|
|
|
<table>
|
|
<tbody>
|
|
<% @feature_flags.each do |feature_flag| %>
|
|
<tr>
|
|
<td>
|
|
<strong><%= t("settings.#{feature_flag.key}") %></strong>
|
|
</td>
|
|
|
|
<td>
|
|
<%= feature_flag.enabled? ? t("admin.settings.index.features.enabled") : t("admin.settings.index.features.disabled") %>
|
|
</td>
|
|
|
|
<td class="text-right">
|
|
<%= form_for(feature_flag, url: admin_setting_path(feature_flag), html: { id: "edit_#{dom_id(feature_flag)}"}) do |f| %>
|
|
|
|
<%= f.hidden_field :value, id: dom_id(feature_flag), value: (feature_flag.enabled? ? "" : "active") %>
|
|
<%= f.submit(t("admin.settings.index.features.#{feature_flag.enabled? ? 'disable' : 'enable'}"),
|
|
class: "button expanded #{feature_flag.enabled? ? 'hollow alert' : 'success'}",
|
|
data: {confirm: t("admin.actions.confirm")}) %>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|