Sha256: e150c004719ac0dfdaf95ea726186bc979b5da94af9b61b4e5dbe45ede96b33f

Contents?: true

Size: 605 Bytes

Versions: 50

Compression:

Stored size: 605 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module ContentBlocks
    class HighlightedElementsSettingsFormCell < Decidim::ViewModel
      alias form model

      def order_options
        available_sorts.map do |sort_key|
          [
            I18n.t("decidim.content_blocks.highlighted_elements_settings_form.orders.#{sort_key}"),
            sort_key
          ]
        end
      end

      def label
        I18n.t("decidim.content_blocks.highlighted_elements_settings_form.orders.label")
      end

      private

      def available_sorts
        %w(random recent)
      end
    end
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
decidim-core-0.29.1 app/cells/decidim/content_blocks/highlighted_elements_settings_form_cell.rb
decidim-core-0.28.4 app/cells/decidim/content_blocks/highlighted_elements_settings_form_cell.rb
decidim-core-0.27.9 app/cells/decidim/content_blocks/highlighted_elements_settings_form_cell.rb
decidim-core-0.29.0 app/cells/decidim/content_blocks/highlighted_elements_settings_form_cell.rb
decidim-core-0.28.3 app/cells/decidim/content_blocks/highlighted_elements_settings_form_cell.rb
decidim-core-0.27.8 app/cells/decidim/content_blocks/highlighted_elements_settings_form_cell.rb
decidim-core-0.29.0.rc4 app/cells/decidim/content_blocks/highlighted_elements_settings_form_cell.rb
decidim-core-0.29.0.rc3 app/cells/decidim/content_blocks/highlighted_elements_settings_form_cell.rb
decidim-core-0.29.0.rc2 app/cells/decidim/content_blocks/highlighted_elements_settings_form_cell.rb
decidim-core-0.29.0.rc1 app/cells/decidim/content_blocks/highlighted_elements_settings_form_cell.rb
decidim-core-0.28.2 app/cells/decidim/content_blocks/highlighted_elements_settings_form_cell.rb
decidim-core-0.27.7 app/cells/decidim/content_blocks/highlighted_elements_settings_form_cell.rb
decidim-core-0.28.1 app/cells/decidim/content_blocks/highlighted_elements_settings_form_cell.rb
decidim-core-0.27.6 app/cells/decidim/content_blocks/highlighted_elements_settings_form_cell.rb
decidim-core-0.26.10 app/cells/decidim/content_blocks/highlighted_elements_settings_form_cell.rb
decidim-core-0.26.9 app/cells/decidim/content_blocks/highlighted_elements_settings_form_cell.rb
decidim-core-0.28.0 app/cells/decidim/content_blocks/highlighted_elements_settings_form_cell.rb
decidim-core-0.27.5 app/cells/decidim/content_blocks/highlighted_elements_settings_form_cell.rb
decidim-core-0.28.0.rc5 app/cells/decidim/content_blocks/highlighted_elements_settings_form_cell.rb
decidim-core-0.28.0.rc4 app/cells/decidim/content_blocks/highlighted_elements_settings_form_cell.rb