Use admin table settings component to render featured settings
Now, with the same template we can render all kind of settings.
This commit is contained in:
committed by
Javi Martín
parent
e7223ba865
commit
6a64f38d17
@@ -7,16 +7,6 @@ class Setting < ApplicationRecord
|
||||
key.split(".").first
|
||||
end
|
||||
|
||||
def type
|
||||
if %w[feature process proposals map html homepage uploads sdg machine_learning].include? prefix
|
||||
prefix
|
||||
elsif %w[remote_census].include? prefix
|
||||
key.rpartition(".").first
|
||||
else
|
||||
"configuration"
|
||||
end
|
||||
end
|
||||
|
||||
def enabled?
|
||||
value.present?
|
||||
end
|
||||
@@ -25,6 +15,10 @@ class Setting < ApplicationRecord
|
||||
key.split(".").last == "content_types"
|
||||
end
|
||||
|
||||
def feature?
|
||||
%w[feature process sdg].include?(prefix)
|
||||
end
|
||||
|
||||
def content_type_group
|
||||
key.split(".").second
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user