summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <hey@jancborchardt.net>2015-05-12 15:17:43 +0200
committerJan-Christoph Borchardt <hey@jancborchardt.net>2015-05-12 15:17:43 +0200
commit46e4d8818ce951383dc467f46f8fc0492536cd48 (patch)
treeef5949e113ebd2e482e09aac573fff97fd1efd54 /apps/files_sharing
parent127b0d9edf4d5666bff4163ecd931ebb8d1d50c6 (diff)
parentb1713b2f75370d6c597c2a2a16ab51431802ade2 (diff)
downloadnextcloud-server-46e4d8818ce951383dc467f46f8fc0492536cd48.tar.gz
nextcloud-server-46e4d8818ce951383dc467f46f8fc0492536cd48.zip
Merge pull request #16127 from owncloud/fix-file-icons-in-shared-file-view
Enable file icons & previews in "Shared ..." categories
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/api/local.php1
-rw-r--r--apps/files_sharing/js/sharedfilelist.js1
2 files changed, 2 insertions, 0 deletions
diff --git a/apps/files_sharing/api/local.php b/apps/files_sharing/api/local.php
index 00509bcee69..03812800c17 100644
--- a/apps/files_sharing/api/local.php
+++ b/apps/files_sharing/api/local.php
@@ -68,6 +68,7 @@ class Local {
if (\OC::$server->getPreviewManager()->isMimeSupported($share['mimetype'])) {
$share['isPreviewAvailable'] = true;
}
+ $share['icon'] = substr(\OC_Helper::mimetypeIcon($share['mimetype']), 0, -3) . 'svg';
}
}
return new \OC_OCS_Result($shares);
diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js
index 2c7d6c7d43a..ca187940a08 100644
--- a/apps/files_sharing/js/sharedfilelist.js
+++ b/apps/files_sharing/js/sharedfilelist.js
@@ -176,6 +176,7 @@
.map(function(share) {
var file = {
id: share.file_source,
+ icon: share.icon,
mimetype: share.mimetype
};
if (share.item_type === 'folder') {