diff options
author | kondou <kondou@ts.unde.re> | 2013-10-12 17:28:20 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-10-12 17:28:20 +0200 |
commit | f828b51ede75ef25db3859156691fb582b76fe39 (patch) | |
tree | 9a51ba1e82c1724783018af6cb55db82cf8e791d /apps/files/index.php | |
parent | 3f54e3c783274c4d6b9ccd06bf434fdf0529d324 (diff) | |
download | nextcloud-server-f828b51ede75ef25db3859156691fb582b76fe39.tar.gz nextcloud-server-f828b51ede75ef25db3859156691fb582b76fe39.zip |
Hide files list header, when theres no files to see
Diffstat (limited to 'apps/files/index.php')
-rw-r--r-- | apps/files/index.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files/index.php b/apps/files/index.php index 8d877be8ac9..7db3fd96380 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -118,6 +118,9 @@ if ($needUpgrade) { $trashEmpty = \OCA\Files_Trashbin\Trashbin::isEmpty($user); } + $isCreatable = \OC\Files\Filesystem::isCreatable($dir . '/'); + $emptyContent = (!isset($files) or !$isCreatable or count($files) > 0 or $ajaxLoad); + OCP\Util::addscript('files', 'fileactions'); OCP\Util::addscript('files', 'files'); OCP\Util::addscript('files', 'keyboardshortcuts'); @@ -125,7 +128,7 @@ if ($needUpgrade) { $tmpl->assign('fileList', $list->fetchPage()); $tmpl->assign('breadcrumb', $breadcrumbNav->fetchPage()); $tmpl->assign('dir', \OC\Files\Filesystem::normalizePath($dir)); - $tmpl->assign('isCreatable', \OC\Files\Filesystem::isCreatable($dir . '/')); + $tmpl->assign('isCreatable', $isCreatable); $tmpl->assign('permissions', $permissions); $tmpl->assign('files', $files); $tmpl->assign('trash', $trashEnabled); @@ -141,6 +144,7 @@ if ($needUpgrade) { $tmpl->assign("encryptionInitStatus", $encryptionInitStatus); $tmpl->assign('disableSharing', false); $tmpl->assign('ajaxLoad', $ajaxLoad); + $tmpl->assign('emptyContent', $emptyContent); $tmpl->printPage(); } |