Sha256: 6bece5644f5b5dc5ccfd4813f16382bb1313ceebde02360dd0922b19a8ea9912

Contents?: true

Size: 839 Bytes

Versions: 39

Compression:

Stored size: 839 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
        case action
        when "update"
          I18n.t(
            "decidim.proposals.last_activity.proposal_updated_at_html",
            link: participatory_space_link
          )
        else
          I18n.t(
            "decidim.proposals.last_activity.new_proposal_at_html",
            link: participatory_space_link
          )
        end
      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

39 entries across 39 versions & 1 rubygems

Version Path
decidim-proposals-0.27.9 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.27.8 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.27.7 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.27.6 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.26.10 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.26.9 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.27.5 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.26.8 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.27.4 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.27.3 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.26.7 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.26.5 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.27.2 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.27.1 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.26.4 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.27.0 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.26.3 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.27.0.rc2 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.27.0.rc1 app/cells/decidim/proposals/proposal_activity_cell.rb
decidim-proposals-0.26.2 app/cells/decidim/proposals/proposal_activity_cell.rb