Sha256: 1d86122c867cc8746228e2586c91400e8da96ffb9cefc522d0b9fef1408d3637
Contents?: true
Size: 1.12 KB
Versions: 21
Compression:
Stored size: 1.12 KB
Contents
# frozen_string_literal: true module Decidim module ParticipatoryProcesses # This cell renders the Medium (:m) process card # for an given instance of a Process class ProcessMCell < Decidim::CardMCell private def has_image? true end def has_state? model.past? end def has_badge? false end def has_step? model.active_step.present? end def state_classes return unless model.past? ["alert"] end def resource_path Decidim::ParticipatoryProcesses::Engine.routes.url_helpers.participatory_process_path(model) end def resource_image_path model.hero_image.url end def step_title translated_attribute model.active_step.title end def base_card_class "card--process" end def statuses [:creation_date, :follow] end def resource_icon icon "processes", class: "icon--big" end def start_date model.start_date end def end_date model.end_date end end end end
Version data entries
21 entries across 21 versions & 1 rubygems