Class: Decidim::ParticipatoryProcesses::ContentBlocks::ProcessesSettingsFormCell

Inherits:
ViewModel
  • Object
show all
Defined in:
app/cells/decidim/participatory_processes/content_blocks/processes_settings_form_cell.rb

Instance Method Summary collapse

Instance Method Details

#content_blockObject



9
10
11
# File 'app/cells/decidim/participatory_processes/content_blocks/processes_settings_form_cell.rb', line 9

def content_block
  options[:content_block]
end

#default_filter_labelObject



17
18
19
# File 'app/cells/decidim/participatory_processes/content_blocks/processes_settings_form_cell.rb', line 17

def default_filter_label
  I18n.t("decidim.participatory_processes.admin.content_blocks.highlighted_processes.selection_criteria")
end

#default_filter_optionsObject



21
22
23
24
# File 'app/cells/decidim/participatory_processes/content_blocks/processes_settings_form_cell.rb', line 21

def default_filter_options
  [[I18n.t("decidim.participatory_processes.admin.content_blocks.highlighted_processes.active"), "active"],
   [I18n.t("decidim.participatory_processes.admin.content_blocks.highlighted_processes.all"), "all"]]
end

#include_default_filter_setting?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'app/cells/decidim/participatory_processes/content_blocks/processes_settings_form_cell.rb', line 13

def include_default_filter_setting?
  form.object.settings.attribute_names.include? "default_filter"
end