aboutsummaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-04-17 13:47:45 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-04-17 13:47:45 +0200
commit542a0a251874f69f9cf2cf9472998dc0a04880c8 (patch)
treea601e4389820d04285033058685c40ebb01b9828 /settings
parente984a3b47a539e3df20870b312564f874ebe4d07 (diff)
downloadnextcloud-server-542a0a251874f69f9cf2cf9472998dc0a04880c8.tar.gz
nextcloud-server-542a0a251874f69f9cf2cf9472998dc0a04880c8.zip
show real data in account information
Diffstat (limited to 'settings')
-rw-r--r--settings/index.php9
-rw-r--r--settings/templates/index.php4
2 files changed, 10 insertions, 3 deletions
diff --git a/settings/index.php b/settings/index.php
index 31db326f6bc..521f2ade9da 100644
--- a/settings/index.php
+++ b/settings/index.php
@@ -8,7 +8,14 @@ if( !OC_USER::isLoggedIn()){
}
-$tmpl = new OC_TEMPLATE( "settings", "index", "admin" );
+$tmpl = new OC_TEMPLATE( "settings", "index", "admin");
+$used=OC_FILESYSTEM::filesize('/');
+$free=disk_free_space(OC_CONFIG::getValue('datadirectory'));
+$total=$free+$used;
+$relative=round(($used/$total)*100);
+$tmpl->assign('usage',OC_HELPER::humanFileSize($used));
+$tmpl->assign('total_space',OC_HELPER::humanFileSize($total));
+$tmpl->assign('usage_relative',$relative);
$tmpl->printPage();
?>
diff --git a/settings/templates/index.php b/settings/templates/index.php
index 910437fefc9..f3f0b533a62 100644
--- a/settings/templates/index.php
+++ b/settings/templates/index.php
@@ -1,8 +1,8 @@
<form id="quota">
<fieldset>
<legend>Account information</legend>
- <div id="quota_indicator"><div style="width:72%;">&nbsp;</div></div>
- <p>You're currently using 72% (7.2GB) of your 10GB space.</p>
+ <div id="quota_indicator"><div style="width:<?php echo $_['usage_relative'] ?>%;">&nbsp;</div></div>
+ <p>You're currently using <?php echo $_['usage_relative'] ?>% (<?php echo $_['usage'] ?>) of your <?php echo $_['total_space'] ?> space.</p>
</fieldset>
</form>