diff options
author | Joas Schilling <coding@schilljs.com> | 2017-06-08 16:42:43 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-06-13 12:27:43 -0500 |
commit | f1da30cc1e39318261fff39ed05b3a571e0a5699 (patch) | |
tree | cdd8c5f4bcec7fce4b4584d7f8d2ff6797777859 /apps/files/lib | |
parent | 4c56414cabc195031cf5dbec00e2b28a67237f85 (diff) | |
download | nextcloud-server-f1da30cc1e39318261fff39ed05b3a571e0a5699.tar.gz nextcloud-server-f1da30cc1e39318261fff39ed05b3a571e0a5699.zip |
Add quota to the files view
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files/lib')
-rw-r--r-- | apps/files/lib/Controller/ViewController.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index f7a4318e595..fc59622af89 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -174,6 +174,17 @@ class ViewController extends Controller { }); $nav->assign('navigationItems', $navItems); + + $nav->assign('usage', \OC_Helper::humanFileSize($storageInfo['used'])); + if ($storageInfo['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED) { + $totalSpace = $this->l10n->t('Unlimited'); + } else { + $totalSpace = \OC_Helper::humanFileSize($storageInfo['total']); + } + $nav->assign('total_space', $totalSpace); + $nav->assign('quota', $storageInfo['quota']); + $nav->assign('usage_relative', $storageInfo['relative']); + $contentItems = []; // render the container content for every navigation item |