Additional proposal sortings

Proposal sorting Proposal sorting Proposal sorting admin Proposal sorting admin

This feature allows you to add additional sorting options to the proposals component. By default 4 additional sortings are included:

  • supported_first: Sort proposals supported by me first.
  • supported_last: Sort proposals supported by me last.
  • az: Sort proposals alphabetically.
  • za: Sort proposals alphabetically (reverse).

By enabling this feature the user choosed sorting method will be stored in the browser's session. This means that if the user changes the sorting method and then navigates to another page, the same sorting will be applied.

You can disable or configure the available sorting types by setting the variable additional_proposal_sortings configuration in an initializer:

# config/initializers/awesome_defaults.rb
        Decidim::DecidimAwesome.configure do |config|
          config.additional_proposal_sortings = :disabled
        end
        
        # Or, to disable alphabetical sorting:
        
        Decidim::DecidimAwesome.configure do |config|
          config.additional_proposal_sortings = [:supported_first, :supported_last]
        end