Sha256: ea0a570be0e68dd0f0e4831e92416a3c514918e9ec11a3b66f9454893e5f3f3e
Contents?: true
Size: 844 Bytes
Versions: 14
Compression:
Stored size: 844 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 < Decidim::ViewModel def show render if collaborative_draft end private def collaborative_draft @collaborative_draft ||= model.linked_resources(:collaborative_draft, "created_from_collaborative_draft").first end def link_to_resource link_to resource_locator(collaborative_draft).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
14 entries across 14 versions & 1 rubygems