Sha256: 2d7ee2dd6cc62232900dc0111540aa8b8cd85af3fe3c596768dfd5d2763b3b46

Contents?: true

Size: 991 Bytes

Versions: 7

Compression:

Stored size: 991 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Conferences
    module ContentBlocks
      class HighlightedConferencesCell < Decidim::ContentBlocks::HighlightedParticipatorySpacesCell
        delegate :current_user, to: :controller

        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

7 entries across 7 versions & 1 rubygems

Version Path
decidim-conferences-0.28.4 app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb
decidim-conferences-0.28.3 app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb
decidim-conferences-0.28.2 app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb
decidim-conferences-0.28.1 app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb
decidim-conferences-0.28.0 app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb
decidim-conferences-0.28.0.rc5 app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb
decidim-conferences-0.28.0.rc4 app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb