lib/decidim/accountability/component.rb in decidim-accountability-0.22.0 vs lib/decidim/accountability/component.rb in decidim-accountability-0.23.0

- old
+ new

@@ -20,11 +20,14 @@ resource.card = "decidim/accountability/result" resource.searchable = false end component.settings(:global) do |settings| + settings.attribute :scopes_enabled, type: :boolean, default: true + settings.attribute :scope_id, type: :scope settings.attribute :comments_enabled, type: :boolean, default: true + settings.attribute :comments_max_length, type: :integer, required: false settings.attribute :intro, type: :text, translated: true, editor: true settings.attribute :categories_label, type: :string, translated: true, editor: true settings.attribute :subcategories_label, type: :string, translated: true, editor: true settings.attribute :heading_parent_level_results, type: :string, translated: true, editor: true settings.attribute :heading_leaf_level_results, type: :string, translated: true, editor: true @@ -65,10 +68,12 @@ settings: { intro: Decidim::Faker::Localized.wrapped("<p>", "</p>") { Decidim::Faker::Localized.sentence(4) }, categories_label: Decidim::Faker::Localized.word, subcategories_label: Decidim::Faker::Localized.word, heading_parent_level_results: Decidim::Faker::Localized.word, - heading_leaf_level_results: Decidim::Faker::Localized.word + heading_leaf_level_results: Decidim::Faker::Localized.word, + scopes_enabled: true, + scope_id: participatory_space.scope&.id } } component = Decidim.traceability.perform_action!("publish", Decidim::Component, admin_user, visibility: "all") do Decidim::Component.create!(params)