Sha256: 6daaae956150608bd2e172727a467cfd22ea63f94ca04461b29ed95718dbad7a

Contents?: true

Size: 589 Bytes

Versions: 13

Compression:

Stored size: 589 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Assemblies
    # This cell renders a list of assemblies in content blocks
    class AssembliesCell < Decidim::ViewModel
      include Decidim::CardHelper

      alias assemblies model

      def total_count
        @total_count ||= options[:total_count] || assemblies.size
      end

      def show_all_path
        @show_all_path ||= options[:show_all_path].presence
      end

      def title
        @title ||= options[:title] || t("name", scope: "decidim.assemblies.content_blocks.related_assemblies")
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

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