Sha256: 1f00a8c51c5cf7804c2b1dfb27e5da5a1b52f7879928f32e3d337a684a5cbac7
Contents?: true
Size: 761 Bytes
Versions: 18
Compression:
Stored size: 761 Bytes
Contents
# frozen_string_literal: true module Decidim module Proposals # This cell renders metadata for an instance of a CollaborativeDraft class CollaborativeDraftMetadataCell < Decidim::CardMetadataCell include Decidim::Proposals::ApplicationHelper delegate :state, to: :model def initialize(*) super @items.prepend(*collaborative_draft_items) end private def collaborative_draft_items [coauthors_item, comments_count_item, endorsements_count_item, state_item] end def state_item return if state.blank? { text: content_tag(:span, humanize_collaborative_draft_state(state), class: "label #{collaborative_drafts_state_class(state)}") } end end end end
Version data entries
18 entries across 18 versions & 1 rubygems