Sha256: 2a85fafe5053a5ea06b27faeea6fd50893ec9d9a20f54041cd3f4ef8029026d2

Contents?: true

Size: 777 Bytes

Versions: 51

Compression:

Stored size: 777 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
        link_to resource_locator(linked_resource).path, class: "link" do
          t("link_to_collaborative_draft_text", scope: "decidim.proposals.proposals.show")
        end
      end

      def link_help_text
        t("link_to_collaborative_draft_help_text", scope: "decidim.proposals.proposals.show")
      end
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

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