$pcpBlock[] = array(
'pageId' => $pcpBlockDao->target_entity_id,
'pageTitle' => $pageTitle,
+ 'component' => $pcpBlockDao->target_entity_type,
'action' => $action,
);
}
{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>