Sha256: 01e815c2a34478d9606cefd0936868db830cb93a377858896329111997f6831f

Contents?: true

Size: 518 Bytes

Versions: 13

Compression:

Stored size: 518 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Blogs
    # This cell renders the card for an instance of a Post
    # the default size is the List Card (:l)
    class PostCell < Decidim::ViewModel
      def show
        cell card_size, model, options
      end

      private

      def card_size
        case @options[:size]
        when :s
          "decidim/blogs/post_s"
        when :g
          "decidim/blogs/post_g"
        else
          "decidim/blogs/post_l"
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
decidim-blogs-0.29.1 app/cells/decidim/blogs/post_cell.rb
decidim-blogs-0.28.4 app/cells/decidim/blogs/post_cell.rb
decidim-blogs-0.29.0 app/cells/decidim/blogs/post_cell.rb
decidim-blogs-0.28.3 app/cells/decidim/blogs/post_cell.rb
decidim-blogs-0.29.0.rc4 app/cells/decidim/blogs/post_cell.rb
decidim-blogs-0.29.0.rc3 app/cells/decidim/blogs/post_cell.rb
decidim-blogs-0.29.0.rc2 app/cells/decidim/blogs/post_cell.rb
decidim-blogs-0.29.0.rc1 app/cells/decidim/blogs/post_cell.rb
decidim-blogs-0.28.2 app/cells/decidim/blogs/post_cell.rb
decidim-blogs-0.28.1 app/cells/decidim/blogs/post_cell.rb
decidim-blogs-0.28.0 app/cells/decidim/blogs/post_cell.rb
decidim-blogs-0.28.0.rc5 app/cells/decidim/blogs/post_cell.rb
decidim-blogs-0.28.0.rc4 app/cells/decidim/blogs/post_cell.rb