dev/financial#6 exclude template contributions from the contact summary and add a...
authorJaap Jansma <jaap.jansma@civicoop.org>
Mon, 21 Jun 2021 14:52:56 +0000 (16:52 +0200)
committerJaap Jansma <jaap.jansma@civicoop.org>
Mon, 21 Jun 2021 14:52:56 +0000 (16:52 +0200)
CRM/Contribute/Page/Tab.php

index cdb4c55fdb39865997bf491d1fc188befe56bfc4..151326fe084e4aa88b7df44760b081be7bf1b436 100644 (file)
@@ -58,7 +58,7 @@ class CRM_Contribute_Page_Tab extends CRM_Core_Page {
         'qs' => "reset=1&id=%%crid%%&cid=%%cid%%&context={$context}",
       ],
     ];
-    if (!empty($templateContribution['id'])) {
+    if (!empty($templateContribution['id']) && !empty($templateContribution['is_template'])) {
       // Use constant CRM_Core_Action::PREVIEW as there is no such thing as view template.
       // And reusing view will mangle the actions.
       $links[CRM_Core_Action::PREVIEW] = [