CRM-15744- fix wrong event link for pcp on dashboard
authorCiviCRM <info@civicrm.org>
Mon, 22 Dec 2014 12:13:36 +0000 (17:43 +0530)
committerCiviCRM <info@civicrm.org>
Mon, 22 Dec 2014 12:13:36 +0000 (17:43 +0530)
CRM/PCP/BAO/PCP.php
templates/CRM/Contribute/Page/PcpUserDashboard.tpl

index 777a5395a3e53f42d8036460195f058996107905..9515a665269f5d688971ae33df3d1a674f90c3bb 100644 (file)
@@ -220,6 +220,7 @@ ORDER BY target_entity_type, target_entity_id
       $pcpBlock[] = array(
         'pageId' => $pcpBlockDao->target_entity_id,
         'pageTitle' => $pageTitle,
+        'component' => $pcpBlockDao->target_entity_type,
         'action' => $action,
       );
     }
index 4048e4378c9d50c97c7aab24d3349bd3bb38a8f4..a17a226ea314310f4f71ff581fdb496a86b25294 100644 (file)
@@ -77,7 +77,7 @@
 
   {foreach from=$pcpBlock item=row}
   <tr class="{cycle values="odd-row,even-row"}">
-    <td><a href="{crmURL p='civicrm/contribute/transact' q="id=`$row.pageId`&reset=1"}" title="{ts}View campaign page{/ts}">{$row.pageTitle}</a></td>
+    <td>{if $row.component eq 'contribute'}<a href="{crmURL p='civicrm/contribute/transact' q="id=`$row.pageId`&reset=1"}" title="{ts}View campaign page{/ts}">{else}<a href="{crmURL p='civicrm/event/register' q="id=`$row.pageId`&reset=1"}" title="{ts}View campaign page{/ts}">{/if}{$row.pageTitle}</a></td>
         <td>{if $row.end_date}{$row.end_date|truncate:10:''|crmDate}{else}({ts}ongoing{/ts}){/if}</td>
     <td>{$row.action|replace:'xx':$row.pageId}</td>
   </tr>