Sha256: 52869afb22f06a23998c4b7dfb3b6fc0f9ce425ed27a483b9652453530b09c39
Contents?: true
Size: 579 Bytes
Versions: 13
Compression:
Stored size: 579 Bytes
Contents
# frozen_string_literal: true module Decidim # Helper that provides a single method to give a class to a # ParticipatoryProcessStep depending on their date. module ParticipatoryProcessStepsHelper # Returns the class for the given step depending on their end_date. # # step - the given ParticipatoryProcessStep # past - a Boolean indicating if the step is past or not # # Returns a String. def step_class(step, past) status = past ? "" : "timeline__item--inactive" step.active? ? "timeline__item--current" : status end end end
Version data entries
13 entries across 13 versions & 2 rubygems