Sha256: be5b5465a78e524bcecf829452e9340013e3909953cc7f1bddad24e845f92910

Contents?: true

Size: 784 Bytes

Versions: 13

Compression:

Stored size: 784 Bytes

Contents

# frozen_string_literal: true

require "cell/partial"

module Decidim
  module Proposals
    # This cell renders the link to the source collaborative draft of a proposal.
    class ProposalLinkToCollaborativeDraftCell < ProposalLinkedResourcesCell
      private

      def linked_resource
        @linked_resource ||= model.linked_resources(:collaborative_draft, "created_from_collaborative_draft").first
      end

      def link_to_resource_url
        resource_locator(linked_resource).path
      end

      def link_to_resource_text
        t("link_to_collaborative_draft_text", scope: "decidim.proposals.proposals.show")
      end

      def link_help_text
        t("link_to_collaborative_draft_help_text", scope: "decidim.proposals.proposals.show")
      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_link_to_collaborative_draft_cell.rb
decidim-proposals-0.28.4 app/cells/decidim/proposals/proposal_link_to_collaborative_draft_cell.rb
decidim-proposals-0.29.0 app/cells/decidim/proposals/proposal_link_to_collaborative_draft_cell.rb
decidim-proposals-0.28.3 app/cells/decidim/proposals/proposal_link_to_collaborative_draft_cell.rb
decidim-proposals-0.29.0.rc4 app/cells/decidim/proposals/proposal_link_to_collaborative_draft_cell.rb
decidim-proposals-0.29.0.rc3 app/cells/decidim/proposals/proposal_link_to_collaborative_draft_cell.rb
decidim-proposals-0.29.0.rc2 app/cells/decidim/proposals/proposal_link_to_collaborative_draft_cell.rb
decidim-proposals-0.29.0.rc1 app/cells/decidim/proposals/proposal_link_to_collaborative_draft_cell.rb
decidim-proposals-0.28.2 app/cells/decidim/proposals/proposal_link_to_collaborative_draft_cell.rb
decidim-proposals-0.28.1 app/cells/decidim/proposals/proposal_link_to_collaborative_draft_cell.rb
decidim-proposals-0.28.0 app/cells/decidim/proposals/proposal_link_to_collaborative_draft_cell.rb
decidim-proposals-0.28.0.rc5 app/cells/decidim/proposals/proposal_link_to_collaborative_draft_cell.rb
decidim-proposals-0.28.0.rc4 app/cells/decidim/proposals/proposal_link_to_collaborative_draft_cell.rb