Sha256: 14f5c99805d96296ac4272a3197640aa841aeefeed0ee206f0f251f8ce4a7ae0

Contents?: true

Size: 726 Bytes

Versions: 38

Compression:

Stored size: 726 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Accountability
    # Helpers needed to render the navigation breadcrumbs in results.
    #
    module BreadcrumbHelper
      def stats_calculator
        @stats_calculator ||= ResultStatsCalculator.new(result)
      end

      def current_scope
        params[:filter][:scope_id] if params[:filter]
      end

      def progress_calculator(scope_id, category_id)
        Decidim::Accountability::ResultsCalculator.new(current_component, scope_id, category_id).progress
      end

      def category
        current_participatory_space.categories.find(params[:filter][:category_id]) if params[:filter] && params[:filter][:category_id].present?
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
decidim-accountability-0.23.6 app/helpers/decidim/accountability/breadcrumb_helper.rb
decidim-accountability-0.23.5 app/helpers/decidim/accountability/breadcrumb_helper.rb
decidim-accountability-0.23.4 app/helpers/decidim/accountability/breadcrumb_helper.rb
decidim-accountability-0.23.3 app/helpers/decidim/accountability/breadcrumb_helper.rb
decidim-accountability-0.23.2 app/helpers/decidim/accountability/breadcrumb_helper.rb
decidim-accountability-0.23.1 app/helpers/decidim/accountability/breadcrumb_helper.rb
decidim-accountability-0.23.1.rc1 app/helpers/decidim/accountability/breadcrumb_helper.rb
decidim-accountability-0.23.0 app/helpers/decidim/accountability/breadcrumb_helper.rb
decidim-accountability-0.22.0 app/helpers/decidim/accountability/breadcrumb_helper.rb
decidim-accountability-0.21.0 app/helpers/decidim/accountability/breadcrumb_helper.rb
decidim-accountability-0.20.1 app/helpers/decidim/accountability/breadcrumb_helper.rb
decidim-accountability-0.20.0 app/helpers/decidim/accountability/breadcrumb_helper.rb
decidim-accountability-0.19.1 app/helpers/decidim/accountability/breadcrumb_helper.rb
decidim-accountability-0.18.1 app/helpers/decidim/accountability/breadcrumb_helper.rb
decidim-accountability-0.19.0 app/helpers/decidim/accountability/breadcrumb_helper.rb
decidim-accountability-0.17.2 app/helpers/decidim/accountability/breadcrumb_helper.rb
decidim-accountability-0.18.0 app/helpers/decidim/accountability/breadcrumb_helper.rb
decidim-accountability-0.17.1 app/helpers/decidim/accountability/breadcrumb_helper.rb
decidim-accountability-0.16.1 app/helpers/decidim/accountability/breadcrumb_helper.rb
decidim-accountability-0.17.0 app/helpers/decidim/accountability/breadcrumb_helper.rb