Sha256: 5aeb5d72c2a1954b6453100344be5665972673fbda94b333fefdd836989ba167

Contents?: true

Size: 566 Bytes

Versions: 8

Compression:

Stored size: 566 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Blogs
    # This cell renders the List (:l) post card
    # for a given instance of a Post
    class PostLCell < Decidim::CardLCell
      delegate :photo, to: :model

      private

      def has_image?
        true
      end

      def has_description?
        true
      end

      def description_length
        500
      end

      def metadata_cell
        "decidim/blogs/post_metadata"
      end

      def resource_image_path
        return if photo.blank?

        photo.url
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
decidim-blogs-0.29.0.rc3 app/cells/decidim/blogs/post_l_cell.rb
decidim-blogs-0.29.0.rc2 app/cells/decidim/blogs/post_l_cell.rb
decidim-blogs-0.29.0.rc1 app/cells/decidim/blogs/post_l_cell.rb
decidim-blogs-0.28.2 app/cells/decidim/blogs/post_l_cell.rb
decidim-blogs-0.28.1 app/cells/decidim/blogs/post_l_cell.rb
decidim-blogs-0.28.0 app/cells/decidim/blogs/post_l_cell.rb
decidim-blogs-0.28.0.rc5 app/cells/decidim/blogs/post_l_cell.rb
decidim-blogs-0.28.0.rc4 app/cells/decidim/blogs/post_l_cell.rb