';
//-- File is an image
if ($fontAwesomeIcon == 'fa fa-file-image-o') {
//-- Get the actual image location and display a thumbnail. It will be linked to a modal to view a larger size.
$path = mfh_getSavedNameUrlForAttachment($att_id, $is_staff);
if ($path == '') {
echo '';
} else {
echo '
';
}
} elseif (in_array($fontAwesomeIcon, array('fa fa-file-word-o', 'fa fa-file-excel-o', 'fa fa-file-powerpoint-o'))) {
//-- Get the actual image location and display a thumbnail. It will be linked to a modal to view a larger size.
$path = mfh_getSavedNameUrlForAttachment($att_id, $is_staff);
$apiPath = preg_replace('/https?:\/\//i', '', $hesk_settings['hesk_url'] . '/api/index.php/v1/tickets/' . $trackingID . '/attachments/' . $att_id);
if ($path == '') {
echo '';
} else {
echo '
';
}
} else {
//-- Display the FontAwesome icon in the panel's body
echo '';
}
echo '
|
' . $att_name . '
| ';
if ($is_staff) {
echo '' . mfh_getNumberOfDownloadsForAttachment($att_id) . ' | ';
}
echo '' . mfh_getAttachmentFileSize($att_id) . ' | ';
echo '
';
/* Can edit and delete tickets? */
$download_path = '';
if ($is_staff) {
$download_path = '../';
if ($can_edit && $can_delete) {
echo ' ';
}
}
echo '
';
echo '
|
';
}
echo '