From aa72f0e612d6764f13960c7c32e1c0da1388c4a2 Mon Sep 17 00:00:00 2001 From: David Toledo Date: Mon, 27 Feb 2017 13:41:05 +0100 Subject: [PATCH] Add percentage to user's quota info * Add percentage to user's quota info Fixes https://github.com/owncloud/core/issues/24011 * Do not show percentage if the quota is Unlimited * translate quota * correct condition and remove print_unescaped Signed-off-by: Morris Jobke --- settings/personal.php | 1 + settings/templates/personal.php | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/settings/personal.php b/settings/personal.php index a1fcd10e0a..a4449754f6 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -158,6 +158,7 @@ $userData = $accountManager->getUser($user); $tmpl->assign('total_space', $totalSpace); $tmpl->assign('usage_relative', $storageInfo['relative']); +$tmpl->assign('quota', $storageInfo['quota']); $tmpl->assign('clients', $clients); $tmpl->assign('email', $userData[\OC\Accounts\AccountManager::PROPERTY_EMAIL]['value']); $tmpl->assign('languages', $languages); diff --git a/settings/templates/personal.php b/settings/templates/personal.php index 31aa268f77..b47e2e28ff 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -28,8 +28,13 @@
80): ?> class="quota-warning" >

- t('You are using %s of %s', - array($_['usage'], $_['total_space'])));?> + + t('You are using %s of %s', + [$_['usage'], $_['total_space']]));?> + + t('You are using %s of %s (%s %%)', + [$_['usage'], $_['total_space'], $_['usage_relative']]));?> +