Sha256: 4f0e60a5bb47218139a001a01c6920b2103561477a3cc04cffb0112d5e0a699d

Contents?: true

Size: 805 Bytes

Versions: 45

Compression:

Stored size: 805 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? || flaggable?
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
decidim-core-0.27.9 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.27.8 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.27.7 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.27.6 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.26.10 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.26.9 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.27.5 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.26.8 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.27.4 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.27.3 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.26.7 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.26.5 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.27.2 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.27.1 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.26.4 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.27.0 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.26.3 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.27.0.rc2 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.27.0.rc1 app/cells/decidim/collapsible_authors_cell.rb
decidim-core-0.26.2 app/cells/decidim/collapsible_authors_cell.rb