Sha256: 870d7a6a0c9774feaa2abcffa633937d3bd4697bb4aa3b33662ba4499f4d0312

Contents?: true

Size: 581 Bytes

Versions: 24

Compression:

Stored size: 581 Bytes

Contents

# frozen_string_literal: true

module Decidim
  class DataConsentCell < Decidim::ViewModel
    def show
      render
    end

    def categories
      @categories ||= Decidim.consent_categories.map do |category|
        {
          slug: category[:slug],
          title: t("layouts.decidim.data_consent.modal.#{category[:slug]}.title"),
          description: t("layouts.decidim.data_consent.modal.#{category[:slug]}.description"),
          mandatory: category[:mandatory],
          items: category.has_key?(:items) ? category[:items] : []
        }
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
decidim-core-0.29.1 app/cells/decidim/data_consent_cell.rb
decidim-core-0.28.4 app/cells/decidim/data_consent_cell.rb
decidim-core-0.27.9 app/cells/decidim/data_consent_cell.rb
decidim-core-0.29.0 app/cells/decidim/data_consent_cell.rb
decidim-core-0.28.3 app/cells/decidim/data_consent_cell.rb
decidim-core-0.27.8 app/cells/decidim/data_consent_cell.rb
decidim-core-0.29.0.rc4 app/cells/decidim/data_consent_cell.rb
decidim-core-0.29.0.rc3 app/cells/decidim/data_consent_cell.rb
decidim-core-0.29.0.rc2 app/cells/decidim/data_consent_cell.rb
decidim-core-0.29.0.rc1 app/cells/decidim/data_consent_cell.rb
decidim-core-0.28.2 app/cells/decidim/data_consent_cell.rb
decidim-core-0.27.7 app/cells/decidim/data_consent_cell.rb
decidim-core-0.28.1 app/cells/decidim/data_consent_cell.rb
decidim-core-0.27.6 app/cells/decidim/data_consent_cell.rb
decidim-core-0.28.0 app/cells/decidim/data_consent_cell.rb
decidim-core-0.27.5 app/cells/decidim/data_consent_cell.rb
decidim-core-0.28.0.rc5 app/cells/decidim/data_consent_cell.rb
decidim-core-0.28.0.rc4 app/cells/decidim/data_consent_cell.rb
decidim-core-0.27.4 app/cells/decidim/data_consent_cell.rb
decidim-core-0.27.3 app/cells/decidim/data_consent_cell.rb