]> source.dussan.org Git - nextcloud-server.git/commitdiff
make usedSpacePercent available in the files app
authorThomas Mueller <thomas.mueller@tmit.eu>
Wed, 2 Jan 2013 14:06:49 +0000 (15:06 +0100)
committerThomas Mueller <thomas.mueller@tmit.eu>
Wed, 2 Jan 2013 14:06:49 +0000 (15:06 +0100)
apps/files/index.php
apps/files/templates/index.php

index b64bde44cc0def096f927d3bc586c1208525ac9e..cdbedbba4771cad284a762699981c6e1b9016627 100644 (file)
@@ -98,6 +98,9 @@ if (OC_Filesystem::isSharable($dir . '/')) {
     $permissions |= OCP\PERMISSION_SHARE;
 }
 
+// information about storage capacities
+$storageInfo=OC_Helper::getStorageInfo();
+
 $tmpl = new OCP\Template('files', 'index', 'user');
 $tmpl->assign('fileList', $list->fetchPage(), false);
 $tmpl->assign('breadcrumb', $breadcrumbNav->fetchPage(), false);
@@ -108,4 +111,5 @@ $tmpl->assign('files', $files);
 $tmpl->assign('uploadMaxFilesize', $maxUploadFilesize);
 $tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize));
 $tmpl->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true)));
+$tmpl->assign('usedSpacePercent', $storageInfo['relative']);
 $tmpl->printPage();
index edf048c7e130401e03389bfc0bcad9a59028e450..5246ff1bea96484f9d5dadd6373c8c0365fe9c47 100644 (file)
 
 <!-- config hints for javascript -->
 <input type="hidden" name="allowZipDownload" id="allowZipDownload" value="<?php echo $_['allowZipDownload']; ?>" />
+<input type="hidden" name="usedSpacePercent" id="usedSpacePercent" value="<?php echo $_['usedSpacePercent']; ?>" />