Sha256: ffb9fa7a84c32dbd8389916f192be4c3572c15a30d6faae89be1ac8aee7a92f7

Contents?: true

Size: 780 Bytes

Versions: 4

Compression:

Stored size: 780 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Conferences
    # This cell renders the Medium (:m) conference card
    # for an given instance of an Conference
    class ConferenceMCell < Decidim::CardMCell
      include Decidim::ViewHooksHelper

      # Needed for the view hooks
      def current_participatory_space
        model
      end

      private

      def has_image?
        true
      end

      def resource_path
        Decidim::Conferences::Engine.routes.url_helpers.conference_path(model)
      end

      def resource_image_path
        model.attached_uploader(:hero_image).path
      end

      def statuses
        [:creation_date, :follow]
      end

      def resource_icon
        icon "conferences", class: "icon--big"
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
decidim-conferences-0.27.9 app/cells/decidim/conferences/conference_m_cell.rb
decidim-conferences-0.27.8 app/cells/decidim/conferences/conference_m_cell.rb
decidim-conferences-0.27.7 app/cells/decidim/conferences/conference_m_cell.rb
decidim-conferences-0.27.6 app/cells/decidim/conferences/conference_m_cell.rb