Sha256: ccdf861da081381f336e1c21a6f67ab4bbb0a626b7dc3cd8c08c3e4dca287d6a
Contents?: true
Size: 925 Bytes
Versions: 5
Compression:
Stored size: 925 Bytes
Contents
# frozen_string_literal: true module Decidim module Votings module ContentBlocks class HeroCell < Decidim::ContentBlocks::ParticipatorySpaceHeroCell delegate :start_time, :end_time, to: :resource def has_hashtag? false end def subtitle "#{start_text} — #{end_text}" end private def start_text content_tag :span, title: t("activemodel.attributes.voting.start_time") do format_date(start_time) end end def end_text content_tag :span, title: t("activemodel.attributes.voting.end_time") do format_date(end_time) end end def format_date(time) if time l(time.to_date, format: :decidim_short) else t("decidim.votings.votings_m.unspecified") end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems