Sha256: 9fe9c611da4b8af4871a4d4eb635a943a5ceac5b4e6cfa82500a0b0d53d641d6
Contents?: true
Size: 656 Bytes
Versions: 13
Compression:
Stored size: 656 Bytes
Contents
# frozen_string_literal: true module Decidim module Blogs # This cell renders metadata for an instance of a Proposal class PostMetadataCell < Decidim::CardMetadataCell def initialize(*) super @items.prepend(*post_items) end private def post_items [author_item, creation_date, comments_count_item, endorsements_count_item] end def creation_date date_at = model.try(:published_at) || model.try(:created_at) { text: l(date_at.to_date, format: :decidim_short_with_month_name_short), icon: "calendar-todo-line" } end end end end
Version data entries
13 entries across 13 versions & 1 rubygems