Sha256: fe822dd2c200d885f5e53a0fa7016171038238ace664d312679ed0c9e297f3a4

Contents?: true

Size: 574 Bytes

Versions: 44

Compression:

Stored size: 574 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Elections
    module Admin
      # Custom helpers for election steps on admin dashboard.
      #
      module StepsHelper
        def steps(current_step)
          step_class = "text-success"
          (["create_election"] + Decidim::Elections::Election.bb_statuses.keys).map do |step|
            if step == current_step
              step_class = "text-muted"
              [step, "text-warning"]
            else
              [step, step_class]
            end
          end
        end
      end
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
decidim-elections-0.28.4 app/helpers/decidim/elections/admin/steps_helper.rb
decidim-elections-0.27.9 app/helpers/decidim/elections/admin/steps_helper.rb
decidim-elections-0.28.3 app/helpers/decidim/elections/admin/steps_helper.rb
decidim-elections-0.27.8 app/helpers/decidim/elections/admin/steps_helper.rb
decidim-elections-0.28.2 app/helpers/decidim/elections/admin/steps_helper.rb
decidim-elections-0.27.7 app/helpers/decidim/elections/admin/steps_helper.rb
decidim-elections-0.28.1 app/helpers/decidim/elections/admin/steps_helper.rb
decidim-elections-0.27.6 app/helpers/decidim/elections/admin/steps_helper.rb
decidim-elections-0.26.10 app/helpers/decidim/elections/admin/steps_helper.rb
decidim-elections-0.26.9 app/helpers/decidim/elections/admin/steps_helper.rb
decidim-elections-0.28.0 app/helpers/decidim/elections/admin/steps_helper.rb
decidim-elections-0.27.5 app/helpers/decidim/elections/admin/steps_helper.rb
decidim-elections-0.28.0.rc5 app/helpers/decidim/elections/admin/steps_helper.rb
decidim-elections-0.28.0.rc4 app/helpers/decidim/elections/admin/steps_helper.rb
decidim-elections-0.26.8 app/helpers/decidim/elections/admin/steps_helper.rb
decidim-elections-0.27.4 app/helpers/decidim/elections/admin/steps_helper.rb
decidim-elections-0.27.3 app/helpers/decidim/elections/admin/steps_helper.rb
decidim-elections-0.26.7 app/helpers/decidim/elections/admin/steps_helper.rb
decidim-elections-0.26.5 app/helpers/decidim/elections/admin/steps_helper.rb
decidim-elections-0.27.2 app/helpers/decidim/elections/admin/steps_helper.rb