Sha256: eaa315b83db46769c648abbcea8ac825c645513c6c73a97e9941192a564080b0

Contents?: true

Size: 829 Bytes

Versions: 13

Compression:

Stored size: 829 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module ContentBlocks
    class ParticipatorySpaceMetricsCell < BaseCell
      def show
        return if metrics.blank?

        render
      end

      private

      def metrics; end

      def scope; end

      def show_all_path; end

      def metrics_count
        Decidim.metrics_registry.filtered(scope:).length
      end

      def highlighted_metrics
        return if metrics.blank?

        metrics.render_charts Decidim.metrics_registry.filtered(highlight: true, scope:)
      end

      def not_highlighted_metrics
        return if metrics.blank?

        metrics.render_charts Decidim.metrics_registry.filtered(highlight: false, scope:)
      end

      def display_not_highlighted_metrics = false

      def data
        { metrics: "" }
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

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