Extract participation processes tab partial to a component
This commit is contained in:
committed by
Javi Martín
parent
f8835debae
commit
684a830515
@@ -1,7 +1,7 @@
|
|||||||
<h2><%= t("admin.settings.index.participation_processes") %></h2>
|
<h2><%= t("admin.settings.index.participation_processes") %></h2>
|
||||||
|
|
||||||
<%= render Admin::Settings::TableComponent.new(setting_name: "feature", table_class: "featured-settings-table") do %>
|
<%= render Admin::Settings::TableComponent.new(setting_name: "feature", table_class: "featured-settings-table") do %>
|
||||||
<% %w[process.debates process.proposals process.polls process.budgets process.legislation].each do |key| %>
|
<% settings.each do |key| %>
|
||||||
<%= render Admin::Settings::RowComponent.new(key, type: :feature, tab: "#tab-participation-processes") %>
|
<%= render Admin::Settings::RowComponent.new(key, type: :feature, tab: "#tab-participation-processes") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
class Admin::Settings::ParticipationProcessesTabComponent < ApplicationComponent
|
||||||
|
def settings
|
||||||
|
%w[
|
||||||
|
process.debates
|
||||||
|
process.proposals
|
||||||
|
process.polls
|
||||||
|
process.budgets
|
||||||
|
process.legislation
|
||||||
|
]
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tabs-panel" id="tab-participation-processes">
|
<div class="tabs-panel" id="tab-participation-processes">
|
||||||
<%= render "participation_processes_tab" %>
|
<%= render Admin::Settings::ParticipationProcessesTabComponent.new %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tabs-panel" id="tab-feature-flags">
|
<div class="tabs-panel" id="tab-feature-flags">
|
||||||
|
|||||||
Reference in New Issue
Block a user