Extract configuration settings tab partial to a component
This commit is contained in:
committed by
Javi Martín
parent
347a9d3d5b
commit
726019616f
@@ -0,0 +1,7 @@
|
||||
<h2><%= t("admin.settings.index.general") %></h2>
|
||||
|
||||
<%= render Admin::Settings::TableComponent.new(setting_name: "setting") do %>
|
||||
<% settings.each do |key| %>
|
||||
<%= render Admin::Settings::RowComponent.new(key, tab: "#tab-configuration") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
38
app/components/admin/settings/configuration_tab_component.rb
Normal file
38
app/components/admin/settings/configuration_tab_component.rb
Normal file
@@ -0,0 +1,38 @@
|
||||
class Admin::Settings::ConfigurationTabComponent < ApplicationComponent
|
||||
def settings
|
||||
%w[
|
||||
official_level_1_name
|
||||
official_level_2_name
|
||||
official_level_3_name
|
||||
official_level_4_name
|
||||
official_level_5_name
|
||||
max_ratio_anon_votes_on_debates
|
||||
max_votes_for_debate_edit
|
||||
max_votes_for_proposal_edit
|
||||
comments_body_max_length
|
||||
proposal_code_prefix
|
||||
votes_for_proposal_success
|
||||
months_to_archive_proposals
|
||||
email_domain_for_officials
|
||||
facebook_handle
|
||||
instagram_handle
|
||||
telegram_handle
|
||||
twitter_handle
|
||||
twitter_hashtag
|
||||
youtube_handle
|
||||
org_name
|
||||
meta_title
|
||||
meta_description
|
||||
meta_keywords
|
||||
proposal_notification_minimum_interval_in_days
|
||||
direct_message_max_per_day
|
||||
mailer_from_name
|
||||
mailer_from_address
|
||||
min_age_to_participate
|
||||
hot_score_period_in_days
|
||||
related_content_score_threshold
|
||||
featured_proposals_number
|
||||
postal_codes
|
||||
]
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user