Sha256: 8169ab147516045fdf2e7ab015cbeac9dfaede382652a242ad885784a52b5434
Contents?: true
Size: 578 Bytes
Versions: 7
Compression:
Stored size: 578 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
7 entries across 7 versions & 1 rubygems