Skip to content

Commit

Permalink
Merge branch 'release/0.28-stable' into fix/proposal-steps
Browse files Browse the repository at this point in the history
  • Loading branch information
microstudi committed Apr 23, 2024
2 parents bfcca23 + 353bf20 commit 6c1549f
Show file tree
Hide file tree
Showing 18 changed files with 15 additions and 621 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ module ProposalAnswerTemplatesControllerOverride
extend ActiveSupport::Concern

included do
def avaliablity_options
@avaliablity_options = []

Decidim::Component.includes(:participatory_space).where(manifest_name: accepted_components)
.select { |a| a.participatory_space.decidim_organization_id == current_organization.id }.each do |component|
@avaliablity_options.push [formatted_name(component), component.id]
end

@avaliablity_options.sort_by!(&:first)
@avaliablity_options.prepend [t("global_scope", scope: "decidim.templates.admin.proposal_answer_templates.index"), 0]
end

private

def accepted_components
[:proposals, :reporting_proposals]
end
Expand Down

This file was deleted.

Loading

0 comments on commit 6c1549f

Please sign in to comment.