From 46f9b19702ea7690da6d60f36423d8bd7bab304c Mon Sep 17 00:00:00 2001 From: leez Date: Fri, 2 May 2014 18:57:38 -0700 Subject: [PATCH] now shows more than one attachment icon if comment has more than one --- CRM/Core/BAO/Note.php | 2 +- templates/CRM/Contact/Page/View/Note.tpl | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CRM/Core/BAO/Note.php b/CRM/Core/BAO/Note.php index f4f4846728..091afa1c0c 100644 --- a/CRM/Core/BAO/Note.php +++ b/CRM/Core/BAO/Note.php @@ -490,7 +490,7 @@ ORDER BY modified_date desc"; // paper icon view for attachments part $paperIconAttachmentInfo = CRM_Core_BAO_File::paperIconAttachment('civicrm_note', $note->id); - $tree[$note->id]['attachment'] = $paperIconAttachmentInfo; + $tree[$note->id]['attachment'] = implode('', $paperIconAttachmentInfo); if ($snippet) { $tree[$note->id]['note'] = nl2br($tree[$note->id]['note']); diff --git a/templates/CRM/Contact/Page/View/Note.tpl b/templates/CRM/Contact/Page/View/Note.tpl index 2f83cb3d07..7794b52217 100644 --- a/templates/CRM/Contact/Page/View/Note.tpl +++ b/templates/CRM/Contact/Page/View/Note.tpl @@ -166,8 +166,6 @@ commentRows['cnote_'+ noteId][response['values'][i].id] ) { continue; } - for (var j in response['values'][i].attachment) { - } str = '' + '' + '' @@ -179,7 +177,7 @@ + '' + ''+ response['values'][i].createdBy +'' + '' - + response['values'][i].attachment[j] + + response['values'][i].attachment + ''+ commentAction.replace(/{cid}/g, response['values'][i].createdById).replace(/{id}/g, response['values'][i].id) +'' commentRows['cnote_'+ noteId][response['values'][i].id] = str; -- 2.25.1