<td class="label">{ts}With Contact{/ts}</td><td class="view-value">{$values.target_contact_value}</td>
</tr>
{/if}
- {if array_key_exists('mailingId', $values)}
+ {if (array_key_exists('mailingId', $values) && $values.mailingId)}
<tr>
<td class="label">{ts}With Contact{/ts}</td><td class="view-value"><a href="{$values.mailingId}" title="{ts}View Mailing Report{/ts}"><i class="crm-i fa-chevron-right" aria-hidden="true"></i>{ts}Mailing Report{/ts}</a></td>
</tr>
<tr>
<td class="label">{ts}Date and Time{/ts}</td><td class="view-value">{$values.activity_date_time|crmDate }</td>
</tr>
- {if array_key_exists('mailingId', $values)}
+ {if (array_key_exists('mailingId', $values) && $values.mailingId)}
<tr>
<td class="label nowrap">
# of opens
<td>
{$mailingReport.mailing.body_text|mb_truncate:30|escape|nl2br}
<br />
- {if $values.mailingId}
<strong><a class="crm-popup" href='{$textViewURL}'><i class="crm-i fa-chevron-right" aria-hidden="true"></i> {ts}View complete message{/ts}</a></strong>
- {/if}
</td>
</tr>
{/if}
<td>
{$mailingReport.mailing.body_html|mb_truncate:30|escape|nl2br}
<br/>
- {if $values.mailingId}
<strong><a class="crm-popup" href='{$htmlViewURL}'><i class="crm-i fa-chevron-right" aria-hidden="true"></i> {ts}View complete message{/ts}</a></strong>
- {/if}
</td>
</tr>
{/if}