Sha256: 6c76bb8130d7ac011282f16c77006d3438719c649fc2fc40ab67c1eed8e32e17

Contents?: true

Size: 793 Bytes

Versions: 14

Compression:

Stored size: 793 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Conferences
    # This cell renders the media link card for an instance of a MediaLink
    class PhotoCell < Decidim::ViewModel
      include Decidim::ApplicationHelper
      include Decidim::SanitizeHelper

      def show
        render
      end

      private

      def index
        @options[:index]
      end

      def image_thumb
        image_tag model.thumbnail_url
      end

      def image_big
        image_tag model.big_url
      end

      def title
        translated_attribute model.title
      end

      def short_description
        decidim_sanitize html_truncate(description, length: 100, separator: "...")
      end

      def description
        translated_attribute(model.description)
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
decidim-conferences-0.21.0 app/cells/decidim/conferences/photo_cell.rb
decidim-conferences-0.20.1 app/cells/decidim/conferences/photo_cell.rb
decidim-conferences-0.20.0 app/cells/decidim/conferences/photo_cell.rb
decidim-conferences-0.19.1 app/cells/decidim/conferences/photo_cell.rb
decidim-conferences-0.18.1 app/cells/decidim/conferences/photo_cell.rb
decidim-conferences-0.19.0 app/cells/decidim/conferences/photo_cell.rb
decidim-conferences-0.17.2 app/cells/decidim/conferences/photo_cell.rb
decidim-conferences-0.18.0 app/cells/decidim/conferences/photo_cell.rb
decidim-conferences-0.17.1 app/cells/decidim/conferences/photo_cell.rb
decidim-conferences-0.16.1 app/cells/decidim/conferences/photo_cell.rb
decidim-conferences-0.17.0 app/cells/decidim/conferences/photo_cell.rb
decidim-conferences-0.16.0 app/cells/decidim/conferences/photo_cell.rb
decidim-conferences-0.15.2 app/cells/decidim/conferences/photo_cell.rb
decidim-conferences-0.15.1 app/cells/decidim/conferences/photo_cell.rb