Sha256: 5f1a697070231c69d8648147afccf60792d7ab0384e53780a4f9282034985b3c

Contents?: true

Size: 703 Bytes

Versions: 4

Compression:

Stored size: 703 Bytes

Contents

# frozen_string_literal: true

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

        def show
          render if highlighted_conferences.any?
        end

        def highlighted_conferences
          OrganizationPrioritizedConferences.new(current_organization, current_user)
        end

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

        def decidim_conferences
          Decidim::Conferences::Engine.routes.url_helpers
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
decidim-conferences-0.16.1 app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb
decidim-conferences-0.16.0 app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb
decidim-conferences-0.15.2 app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb
decidim-conferences-0.15.1 app/cells/decidim/conferences/content_blocks/highlighted_conferences_cell.rb