1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 23:20:51 +00:00

[address book] modified group quota shown and etc.

This commit is contained in:
llj
2018-05-10 12:13:47 +08:00
parent 243aa2f5c9
commit 97b0e98c7d
2 changed files with 12 additions and 5 deletions

View File

@@ -118,15 +118,22 @@ define([
data['time'] = created_at.format('LLLL');
data['time_from_now'] = Common.getRelativeTimeStr(created_at);
data['quota_error'] = false;
switch(data['quota']) {
case -2: // no limit
data['quota_shown'] = '--';
break;
case -1: // not set or error
data['quota_shown'] = 0;
data['quota_shown'] = gettext("Error");
data['quota_error'] = true;
break;
default:
data['quota_shown'] = Common.quotaSizeFormat(data['quota']);
if (data['quota'] > 0) {
data['quota_shown'] = Common.quotaSizeFormat(data['quota']);
} else {
data['quota_shown'] = gettext("Error");
data['quota_error'] = true;
}
}
this.$el.html(this.template(data));