mirror of
https://github.com/sismics/docs.git
synced 2025-12-22 14:11:39 +00:00
Closes #166: global quota
This commit is contained in:
@@ -77,7 +77,7 @@ angular.module('docs').controller('DocumentDefault', function($scope, $rootScope
|
||||
})
|
||||
.error(function (data) {
|
||||
newfile.status = $translate.instant('document.default.upload_error');
|
||||
if (data.type == 'QuotaReached') {
|
||||
if (data.type === 'QuotaReached') {
|
||||
newfile.status += ' - ' + $translate.instant('document.default.upload_error_quota');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -157,6 +157,10 @@
|
||||
|
||||
<div class="row" ng-controller="Footer">
|
||||
<div class="col-md-12 footer text-center text-muted">
|
||||
<div class="alert alert-danger" ng-show="app.global_storage_quota && app.global_storage_quota * 0.8 < app.global_storage_current"
|
||||
translate="index.global_quota_warning"
|
||||
translate-values="{ current: app.global_storage_current / 1000000, percent: app.global_storage_current / app.global_storage_quota * 100, total: app.global_storage_quota / 1000000 }">
|
||||
</div>
|
||||
<ul class="list-inline">
|
||||
<li uib-dropdown class="dropdown">
|
||||
<a href uib-dropdown-toggle>
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
"error_info": "{{ count }} new error{{ count > 1 ? 's' : '' }}",
|
||||
"logged_as": "Logged in as {{ username }}",
|
||||
"nav_settings": "Settings",
|
||||
"logout": "Logout"
|
||||
"logout": "Logout",
|
||||
"global_quota_warning": "<strong>Warning!</strong> Global quota almost reached at {{ current | number: 0 }}MB ({{ percent | number: 1 }}%) used on {{ total | number: 0 }}MB"
|
||||
},
|
||||
"document": {
|
||||
"search_simple": "Simple search",
|
||||
|
||||
Reference in New Issue
Block a user