module Admin::SupportingPagesHelper
  def related_policy_links(supporting_page)
    supporting_page.related_policies.map do |policy|
      url = if supporting_page.published?
        public_document_path(supporting_page, policy_id: policy.document)
      else
        preview_document_path(supporting_page, policy_id: policy.document)
      end

      [url, policy.title]
    end
  end
end

module Admin::SupportingPagesHelper
  def related_policy_links(supporting_page)
    supporting_page.related_policies.map do |policy|
      url = if supporting_page.published?
        public_document_path(supporting_page, policy_id: policy.document)
      else
        preview_document_path(supporting_page, policy_id: policy.document)
      end

      [url, "View with policy: #{policy.title}"]
    end
  end
end

Add context to supporting page preview dropdown
Add context to supporting page preview dropdown

Show "View with policy" before links to make it clear what the options
are.
