Sha256: ea8af00000b7f06eb787d4fe7250213af9ddb7de8c58ae4562c830446b2c954e

Contents?: true

Size: 942 Bytes

Versions: 6

Compression:

Stored size: 942 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Conferences
    module ContentBlocks
      class HighlightedConferencesCell < Decidim::ContentBlocks::HighlightedParticipatorySpacesCell
        def highlighted_spaces
          @highlighted_spaces ||= OrganizationPrioritizedConferences
                                  .new(current_organization, current_user)
                                  .query
                                  .with_attached_hero_image
                                  .includes([:organization])
        end

        def i18n_scope
          "decidim.conferences.pages.home.highlighted_conferences"
        end

        def all_path
          Decidim::Conferences::Engine.routes.url_helpers.conferences_path
        end

        def max_results
          model.settings.max_results
        end

        private

        def block_id
          "highlighted-conferences"
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
decidim-conferences-0.29.1 app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb
decidim-conferences-0.29.0 app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb
decidim-conferences-0.29.0.rc4 app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb
decidim-conferences-0.29.0.rc3 app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb
decidim-conferences-0.29.0.rc2 app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb
decidim-conferences-0.29.0.rc1 app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb