Sha256: cc3a0de4cc3c9cb3d63e2d8867ef38d74d3efc16e0bea95134b5152695939e50

Contents?: true

Size: 803 Bytes

Versions: 14

Compression:

Stored size: 803 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # This cell renders a collapsible list of authors. Each element from the
  # array of Users will be rendered with the `:cell` cell.
  #
  # Available sizes:
  #  - any number from 1 to 12
  #  - default value is 3
  #  - it is delegated to the `decidim/collapsible_list` cell
  #
  # Example:
  #
  #    cell(
  #      "decidim/collapsible_authors",
  #      list_of_authors,
  #      cell_name: "my/cell",
  #      cell_options: { my: :options },
  #      hidden_elements_count_i18n_key: "my.custom.key",
  #      size: 3
  #    )
  class CollapsibleAuthorsCell < CollapsibleListCell
    include CellsHelper

    private

    def actionable?
      return false if options[:has_actions] == false
      true if withdrawable? || flagable?
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
decidim-core-0.18.1 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.17.2 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.18.0 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.17.1 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.16.1 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.17.0 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.16.0 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.15.2 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.15.1 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.15.0 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.14.4 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.14.3 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.14.2 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.14.1 app/cells/decidim/collapsible_authors_cell.rb