Sha256: 85a247e097417460e497cfbd9ad85e0f9c1014c70f4b20ee3f05b8dfcce71120

Contents?: true

Size: 863 Bytes

Versions: 55

Compression:

Stored size: 863 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Initiatives
    module ContentBlocks
      class HighlightedInitiativesSettingsFormCell < Decidim::ViewModel
        alias form model

        def content_block
          options[:content_block]
        end

        def max_results_label
          I18n.t("decidim.initiatives.admin.content_blocks.highlighted_initiatives.max_results")
        end

        def order_label
          I18n.t("decidim.initiatives.admin.content_blocks.highlighted_initiatives.order.label")
        end

        def order_select
          [
            [I18n.t("decidim.initiatives.admin.content_blocks.highlighted_initiatives.order.default"), "default"],
            [I18n.t("decidim.initiatives.admin.content_blocks.highlighted_initiatives.order.most_recent"), "most_recent"]
          ]
        end
      end
    end
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
decidim-initiatives-0.30.0.rc3 app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb
decidim-initiatives-0.30.0.rc2 app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb
decidim-initiatives-0.30.0.rc1 app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb
decidim-initiatives-0.29.2 app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb
decidim-initiatives-0.28.5 app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb
decidim-initiatives-0.29.1 app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb
decidim-initiatives-0.28.4 app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb
decidim-initiatives-0.27.9 app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb
decidim-initiatives-0.29.0 app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb
decidim-initiatives-0.28.3 app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb
decidim-initiatives-0.27.8 app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb
decidim-initiatives-0.29.0.rc4 app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb
decidim-initiatives-0.29.0.rc3 app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb
decidim-initiatives-0.29.0.rc2 app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb
decidim-initiatives-0.29.0.rc1 app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb
decidim-initiatives-0.28.2 app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb
decidim-initiatives-0.27.7 app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb
decidim-initiatives-0.28.1 app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb
decidim-initiatives-0.27.6 app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb
decidim-initiatives-0.26.10 app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_settings_form_cell.rb