From: Coleman Watts Date: Wed, 29 Mar 2017 18:11:36 +0000 (-0400) Subject: Icons for attachments X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=30a0455fcd70e0f4d608b560be1d2bc60e9ed163;p=civicrm-core.git Icons for attachments --- diff --git a/CRM/Core/BAO/File.php b/CRM/Core/BAO/File.php index b0e5a65a5a..892ef1690f 100644 --- a/CRM/Core/BAO/File.php +++ b/CRM/Core/BAO/File.php @@ -319,6 +319,7 @@ class CRM_Core_BAO_File extends CRM_Core_DAO_File { $result['url'] = CRM_Utils_System::url('civicrm/file', "reset=1&id={$dao->cfID}&eid={$dao->entity_id}"); $result['href'] = "{$result['cleanName']}"; $result['tag'] = CRM_Core_BAO_EntityTag::getTag($dao->cfID, 'civicrm_file'); + $result['icon'] = CRM_Utils_File::getIconFromMimeType($dao->mime_type); if ($addDeleteArgs) { $result['deleteURLArgs'] = self::deleteURLArgs($dao->entity_table, $dao->entity_id, $dao->cfID); } diff --git a/templates/CRM/Form/attachment.tpl b/templates/CRM/Form/attachment.tpl index e068149550..988796e536 100644 --- a/templates/CRM/Form/attachment.tpl +++ b/templates/CRM/Form/attachment.tpl @@ -31,7 +31,7 @@ {foreach from=$currentAttachmentInfo key=attKey item=attVal}
- {$attVal.cleanName} + {$attVal.cleanName} {if $attVal.description} - {$attVal.description}{/if} {if !empty($attVal.tag)}