Module: Decidim::ParticipatoryProcesses::Admin::ParticipatoryProcessHelper

Defined in:
app/helpers/decidim/participatory_processes/admin/participatory_process_helper.rb

Overview

Helpers related to the Admin of Participatory Process layout.

Instance Method Summary collapse

Instance Method Details

#scope_type_depth_select_html_optionsObject



16
17
18
19
20
# File 'app/helpers/decidim/participatory_processes/admin/participatory_process_helper.rb', line 16

def scope_type_depth_select_html_options
  html_options = {}
  html_options[:disabled] = "disabled" unless current_participatory_process.try(:scopes_enabled)
  html_options
end

#scope_type_depth_select_optionsObject



8
9
10
11
12
13
14
# File 'app/helpers/decidim/participatory_processes/admin/participatory_process_helper.rb', line 8

def scope_type_depth_select_options
  {
    include_blank: true,
    help_text: t("scope_type_max_depth_help", scope: "decidim.participatory_processes.admin.participatory_processes.form"),
    selected: current_participatory_process.try(:decidim_scope_type_id)
  }
end