diff --git a/include/RedDAV/RedBrowser.php b/include/RedDAV/RedBrowser.php index c96b98742..efea5d92f 100644 --- a/include/RedDAV/RedBrowser.php +++ b/include/RedDAV/RedBrowser.php @@ -296,7 +296,7 @@ class RedBrowser extends DAV\Browser\Plugin { $quota['used'] = $used; $quota['limit'] = $limit; $quota['desc'] = $quotaDesc; - $quota['warning'] = (($limit && ($limit - $used) < 104857600) ? true : false); // 10485760 bytes = 100MB + $quota['warning'] = ((($limit) && ((round($used / $limit, 1) * 100) >= 90)) ? t('WARNING:') : ''); // 10485760 bytes = 100MB $output .= replace_macros(get_markup_template('cloud_actionspanel.tpl'), array( '$folder_header' => t('Create new folder'), diff --git a/view/tpl/cloud_actionspanel.tpl b/view/tpl/cloud_actionspanel.tpl index 4d2afa8ef..44e4eb54c 100644 --- a/view/tpl/cloud_actionspanel.tpl +++ b/view/tpl/cloud_actionspanel.tpl @@ -8,7 +8,7 @@
- {{if $quota.limit || $quota.used}}
{{$quota.desc}}
{{/if}} + {{if $quota.limit || $quota.used}}
{{if $quota.warning}}{{$quota.warning}} {{/if}}{{$quota.desc}}
{{/if}}