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.27.1 app/cells/decidim/statistic_cell.rb
decidim-core-0.26.4 app/cells/decidim/statistic_cell.rb
decidim-core-0.27.0 app/cells/decidim/statistic_cell.rb
decidim-core-0.26.3 app/cells/decidim/statistic_cell.rb
decidim-core-0.27.0.rc2 app/cells/decidim/statistic_cell.rb
decidim-core-0.27.0.rc1 app/cells/decidim/statistic_cell.rb
decidim-core-0.26.2 app/cells/decidim/statistic_cell.rb
decidim-core-0.26.1 app/cells/decidim/statistic_cell.rb
decidim-core-0.26.0 app/cells/decidim/statistic_cell.rb
decidim-core-0.26.0.rc2 app/cells/decidim/statistic_cell.rb
decidim-core-0.26.0.rc1 app/cells/decidim/statistic_cell.rb
decidim-core-0.25.2 app/cells/decidim/statistic_cell.rb
decidim-core-0.25.1 app/cells/decidim/statistic_cell.rb
decidim-core-0.25.0 app/cells/decidim/statistic_cell.rb
decidim-core-0.25.0.rc4 app/cells/decidim/statistic_cell.rb
decidim-core-0.25.0.rc3 app/cells/decidim/statistic_cell.rb
decidim-core-0.25.0.rc2 app/cells/decidim/statistic_cell.rb
decidim-core-0.25.0.rc1 app/cells/decidim/statistic_cell.rb