mirror of
https://github.com/itflow-org/itflow
synced 2026-09-01 20:35:12 +00:00
Enhancement: Files: Document and Files are easily distinguashable now with the option to choose all docs or just files. Thumbnails view now shows all files, Previews now available for documents, pdfs, txts etc, List view and Thumbnail view now retain in search param when navigating folders
This commit is contained in:
@@ -154,34 +154,3 @@ function portalEmptyState($message, $icon = 'fa-inbox', $type = 'secondary') {
|
||||
return '<div class="alert alert-' . $type . '"><i class="fa fa-fw ' . $icon . ' me-2"></i>' . $message . '</div>';
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns appropriate FontAwesome icon for file extension
|
||||
*/
|
||||
function getFileIcon($file_extension) {
|
||||
$file_extension = strtolower($file_extension);
|
||||
|
||||
// Document icons
|
||||
if (in_array($file_extension, ['pdf'])) {
|
||||
return 'file-pdf';
|
||||
} elseif (in_array($file_extension, ['doc', 'docx'])) {
|
||||
return 'file-word';
|
||||
} elseif (in_array($file_extension, ['xls', 'xlsx'])) {
|
||||
return 'file-excel';
|
||||
} elseif (in_array($file_extension, ['ppt', 'pptx'])) {
|
||||
return 'file-powerpoint';
|
||||
} elseif (in_array($file_extension, ['txt', 'md', 'rtf'])) {
|
||||
return 'file-alt';
|
||||
} elseif (in_array($file_extension, ['zip', 'rar', '7z', 'tar', 'gz'])) {
|
||||
return 'file-archive';
|
||||
} elseif (in_array($file_extension, ['jpg', 'jpeg', 'png', 'gif', 'webp', 'bmp'])) {
|
||||
return 'file-image';
|
||||
} elseif (in_array($file_extension, ['mp4', 'avi', 'mov', 'wmv', 'flv'])) {
|
||||
return 'file-video';
|
||||
} elseif (in_array($file_extension, ['mp3', 'wav', 'ogg', 'flac'])) {
|
||||
return 'file-audio';
|
||||
} elseif (in_array($file_extension, ['html', 'htm', 'css', 'js', 'php', 'py', 'java'])) {
|
||||
return 'file-code';
|
||||
} else {
|
||||
return 'file';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user