mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-11-01 10:49:12 -05:00
Admins switch features on and off at /admin/features, kept in Flipper. Job ideas (the page, the banners and the overlay) only show while its flag is on. Features are off until switched on. Closes #5050
32 lines
1000 B
Plaintext
32 lines
1000 B
Plaintext
- content_for :title, t('.title')
|
|
|
|
- content_for :breadcrumbs do
|
|
%li.breadcrumb-item= link_to 'Admin', admin_path
|
|
%li.breadcrumb-item.active= link_to t('.title'), admin_features_path
|
|
|
|
%p= t('.intro')
|
|
|
|
%table.table.table-striped
|
|
%thead
|
|
%tr
|
|
%th= t('.feature')
|
|
%th= t('.state')
|
|
%th
|
|
%tbody
|
|
- @features.each do |feature|
|
|
%tr{ id: "feature-#{feature.name}" }
|
|
%td
|
|
%strong= t("admin.features.names.#{feature.name}")
|
|
%br
|
|
%span.text-muted= t("admin.features.descriptions.#{feature.name}")
|
|
%td
|
|
- if feature.enabled?
|
|
%span.badge.bg-success= t('.on')
|
|
- else
|
|
%span.badge.bg-secondary= t('.off')
|
|
%td
|
|
- on = feature.enabled?
|
|
= button_to t(on ? '.switch_off' : '.switch_on'), admin_feature_path(feature),
|
|
method: :patch, params: { enabled: !on },
|
|
class: ['btn btn-sm', on ? 'btn-outline-secondary' : 'btn-primary']
|