Sha256: d06873e02cb19eb33d34d04a3b4925f821ae50dd59976f35103f5174ee4b0edc
Contents?: true
Size: 826 Bytes
Versions: 37
Compression:
Stored size: 826 Bytes
Contents
# frozen_string_literal: true require "cell/partial" module Decidim module Accountability # This cell renders the Medium (:m) result card # for an instance of a Result class ResultMCell < Decidim::CardMCell include Decidim::SanitizeHelper include Decidim::TranslationsHelper include ActiveSupport::NumberHelper delegate :start_date, :end_date, :progress, to: :model private def resource_path resource_locator(model).path end def progress_text return if progress.blank? number_to_percentage(progress, precision: 1, strip_insignificant_zeros: true, locale: I18n.locale, format: "%n%") end def statuses [] end def has_dates? start_date.present? && end_date.present? end end end end
Version data entries
37 entries across 37 versions & 1 rubygems