Sha256: f95212e50da6286a9e8baf68f9d25ecf702a9cbb676f06a52be670c023905fd7

Contents?: true

Size: 426 Bytes

Versions: 38

Compression:

Stored size: 426 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # This cell renders a Statistic of a Resource
  class StatisticCell < Decidim::ViewModel
    include ActionView::Helpers::NumberHelper

    private

    def stat_number
      number_with_delimiter(model[:stat_number])
    end

    def stat_dom_class
      model[:stat_title]
    end

    def stat_title
      t(model[:stat_title], scope: "decidim.statistics")
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

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