Fix emails
authorlarssandergreen <lars@wildsight.ca>
Wed, 26 Apr 2023 21:35:59 +0000 (15:35 -0600)
committerlarssandergreen <lars@wildsight.ca>
Wed, 26 Apr 2023 21:35:59 +0000 (15:35 -0600)
templates/CRM/Activity/Form/ActivityView.tpl

index 81f4c6d989803ff1151adadd7bc9eaf8f5e976b4..db41ef0a78b7dd9ab1d772f01d4d69dd2fc9aa4a 100644 (file)
@@ -20,7 +20,7 @@
                 <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>
@@ -43,7 +43,7 @@
         <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
@@ -83,9 +83,7 @@
                               <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}
@@ -96,9 +94,7 @@
                               <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}