Sha256: 9e613b8055d2f8da30c1b0d86d13adc83e3f878c4e4b4f64dff1bf4cebfc806f

Contents?: true

Size: 631 Bytes

Versions: 13

Compression:

Stored size: 631 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Proposals
    # A cell to display when actions happen on a proposal.
    class ProposalActivityCell < ActivityCell
      def title
        action == "update" ? I18n.t("decidim.proposals.last_activity.proposal_updated") : I18n.t("decidim.proposals.last_activity.new_proposal")
      end

      def resource_link_text
        decidim_html_escape(presenter.title)
      end

      def description
        strip_tags(presenter.body(links: true))
      end

      def presenter
        @presenter ||= Decidim::Proposals::ProposalPresenter.new(resource)
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
decidim-proposals-0.29.1 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.28.4 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.29.0 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.28.3 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.29.0.rc4 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.29.0.rc3 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.29.0.rc2 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.29.0.rc1 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.28.2 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.28.1 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.28.0 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.28.0.rc5 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.28.0.rc4 app/cells/decidim/proposals/proposal_activity_cell.rb