47 lines
1.5 KiB
Plaintext
47 lines
1.5 KiB
Plaintext
<table>
|
|
<thead>
|
|
<tr>
|
|
<th><%= t("admin.settings.setting") %></th>
|
|
<th><%= t("admin.settings.setting_status") %></th>
|
|
<th><%= t("admin.settings.setting_actions") %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% features.each do |feature| %>
|
|
<tr>
|
|
<td class="small-8">
|
|
<strong><%= t("settings.#{feature.key}") %></strong>
|
|
<br>
|
|
<span class="small">
|
|
<%= t("settings.#{feature.key}_description", default: t("admin.settings.no_description")) %>
|
|
</span>
|
|
</td>
|
|
|
|
<td>
|
|
<% if feature.enabled? %>
|
|
<span class="enabled">
|
|
<strong>
|
|
<%= t ("admin.settings.index.features.enabled") %>
|
|
</strong>
|
|
</span>
|
|
<% else %>
|
|
<span class="disabled">
|
|
<%= t("admin.settings.index.features.disabled") %>
|
|
</span>
|
|
<% end %>
|
|
</td>
|
|
|
|
<td class="text-right">
|
|
<%= form_for(feature, url: admin_setting_path(feature), html: { id: "edit_#{dom_id(feature)}"}) do |f| %>
|
|
|
|
<%= f.hidden_field :value, id: dom_id(feature), value: (feature.enabled? ? "" : "active") %>
|
|
<%= f.submit(t("admin.settings.index.features.#{feature.enabled? ? "disable" : "enable"}"),
|
|
class: "button expanded #{feature.enabled? ? "hollow alert" : "success"}",
|
|
data: {confirm: t("admin.actions.confirm")}) %>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|